The ddp-server has’t groundbreaking changes since the Meteor 1.5.
So it will work with Meteor version >= 1.5.
There is some changes in an interaction between ddp-client and ddp-server in versions from 1.4.4 to 1.5, so I not recommended try it on the Meteor 1.4.
If you wish to try on Meteor 1.4, you probably need to replace the original ddp-client with more recent version.
In addition to use the µWebSockets, this pull request give developers the option to write a custom stream server and use it instead the standard SockJS-based stream-server.
Status unknown.
I made changes requested by @benjamn, but I didn’t receive any feedback from him after.
Then add to project.
Meteor.loginWithPassword(‘xxxx@xxx.com’,‘xxxx’,function(err){
console.log(‘error’,err);
});
Show Error
I20180926-11:33:17.588(7)? Exception while invoking method ‘login’ TypeError: DiffSequence.diffMaps is not a function
I20180926-11:33:17.588(7)? at Session._diffCollectionViews (packages/ddp-server/livedata_server.js:762:18)
I20180926-11:33:17.589(7)? at packages/ddp-server/livedata_server.js:842:12
I20180926-11:33:17.589(7)? at Object.Meteor._noYieldsAllowed (packages/meteor.js:848:12)
I20180926-11:33:17.590(7)? at Session._setUserId (packages/ddp-server/livedata_server.js:840:12)
I20180926-11:33:17.590(7)? at MethodInvocation.setUserId [as _setUserId] (packages/ddp-server/livedata_server.js:677:14)
I20180926-11:33:17.591(7)? at MethodInvocation.setUserId (packages/ddp-common/method_invocation.js:92:10)
I20180926-11:33:17.592(7)? at AccountsServer.Ap._loginUser (packages/accounts-base/accounts_server.js:306:20)
I20180926-11:33:17.593(7)? at AccountsServer.Ap._attemptLogin (packages/accounts-base/accounts_server.js:360:12)
I20180926-11:33:17.593(7)? at MethodInvocation.methods.login (packages/accounts-base/accounts_server.js:545:21)
I20180926-11:33:17.593(7)? at currentArgumentChecker.withValue (packages/check/match.js:118:15)
I20180926-11:33:17.593(7)? at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1304:12)
I20180926-11:33:17.594(7)? at Object._failIfArgumentsAreNotAllChecked (packages/check/match.js:116:43)
I20180926-11:33:17.613(7)? at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1780:18)
I20180926-11:33:17.613(7)? at DDP._CurrentMethodInvocation.withValue (packages/ddp-server/livedata_server.js:719:19)
I20180926-11:33:17.614(7)? at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1304:12)
I20180926-11:33:17.614(7)? at DDPServer._CurrentWriteFence.withValue (packages/ddp-server/livedata_server.js:717:46)
I20180926-11:33:17.614(7)? at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1304:12)
I20180926-11:33:17.615(7)? at Promise (packages/ddp-server/livedata_server.js:715:46)
I20180926-11:33:17.615(7)? at new Promise ()
I20180926-11:33:17.615(7)? at Session.method (packages/ddp-server/livedata_server.js:689:23)
I20180926-11:33:17.616(7)? at packages/ddp-server/livedata_server.js:559:43
meteor@1.9.0 # Shared foundation for all Meteor packages
static-html # Define static page content in .html files
standard-minifier-css@1.4.1 # CSS minifier run for production mode
standard-minifier-js@2.3.4 # JS minifier run for production mode
es5-shim@4.8.0 # ECMAScript 5 compatibility for older browsers
ecmascript@0.11.1 # Enable ECMAScript2015+ syntax in app code
shell-server@0.3.1 # Server-side component of the `meteor shell` command
webapp@1.6.0 # Serves a Meteor app over HTTP
server-render@0.3.1 # Support for server-side rendering
accounts-base@1.4.2
accounts-facebook@1.3.1
accounts-password@1.5.1
socket-stream-client@=0.2.1
stream-server-uws
import { Meteor } from "meteor/meteor";
import { onPageLoad } from "meteor/server-render";
Meteor.startup(() => {
// Code to run on server startup.
console.log(`Greetings from ${module.id}!`);
});
onPageLoad(sink => {
// Code to run on every request.
sink.renderIntoElementById(
"server-render-target",
`Server time: ${new Date}`
);
});
Meteor.startup(function(){
if (Meteor.users.find().count() === 0) {
Accounts.createUser({
email:'test@test.com',
password:'11111',
profile:{
full_name:'Test DDP'
}
});
}
});
the project work as expected after inititialized.
But got error after added these 2 plugin
socket-stream-client@=0.2.1
stream-server-uws
error message as below
I20180926-15:34:54.729(7)? Exception while invoking method 'login' TypeError: DiffSequence.diffMaps is not a function
I20180926-15:34:54.731(7)? at Session._diffCollectionViews (packages/ddp-server/livedata_server.js:762:18)
I20180926-15:34:54.732(7)? at packages/ddp-server/livedata_server.js:842:12
I20180926-15:34:54.732(7)? at Object.Meteor._noYieldsAllowed (packages/meteor.js:848:12)
I20180926-15:34:54.732(7)? at Session._setUserId (packages/ddp-server/livedata_server.js:840:12)
I20180926-15:34:54.732(7)? at MethodInvocation.setUserId [as _setUserId] (packages/ddp-server/livedata_server.js:677:14)
I20180926-15:34:54.733(7)? at MethodInvocation.setUserId (packages/ddp-common/method_invocation.js:92:10)
I20180926-15:34:54.733(7)? at AccountsServer.Ap._loginUser (packages/accounts-base/accounts_server.js:306:20)
I20180926-15:34:54.733(7)? at AccountsServer.Ap._attemptLogin (packages/accounts-base/accounts_server.js:360:12)
I20180926-15:34:54.733(7)? at MethodInvocation.methods.login (packages/accounts-base/accounts_server.js:545:21)
I20180926-15:34:54.734(7)? at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1783:12)
I20180926-15:34:54.734(7)? at DDP._CurrentMethodInvocation.withValue (packages/ddp-server/livedata_server.js:719:19)
I20180926-15:34:54.734(7)? at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1304:12)
I20180926-15:34:54.734(7)? at DDPServer._CurrentWriteFence.withValue (packages/ddp-server/livedata_server.js:717:46)
I20180926-15:34:54.735(7)? at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1304:12)
I20180926-15:34:54.735(7)? at Promise (packages/ddp-server/livedata_server.js:715:46)
I20180926-15:34:54.745(7)? at new Promise (<anonymous>)
I20180926-15:34:54.746(7)? at Session.method (packages/ddp-server/livedata_server.js:689:23)
I20180926-15:34:54.746(7)? at packages/ddp-server/livedata_server.js:559:43