Karnith / sails-generate-new-gulp

Generate a Sails app using gulp instead of grunt.
MIT License
34 stars 3 forks source link

Fix Deprecation Warnings #9

Closed kevintechie closed 8 years ago

kevintechie commented 9 years ago

Generating a new project and then 'sails lift' causes deprication warnings:

debug: Deprecation warning: Support for sails.config.sockets.onConnect will be removed in an upcoming release. See the v0.11 migration guide for more information and alternate options. debug: Deprecation warning: sails.config.sockets.onDisconnect is now sails.config.sockets.afterDisconnect Setting it for you this time, but note that the new afterDisconnect now receives an additional final argument (a callback). More info: http://sailsjs.org/#!/documentation/reference/sails.config/sails.config.sockets.html

Karnith commented 9 years ago

Hi, I'm currently in the process of updating all the generators and creating machine packs of them.

-------- Original message -------- From: Kevin Coleman notifications@github.com Date: 07/22/2015 13:24 (GMT-08:00) To: Karnith/sails-generate-new-gulp sails-generate-new-gulp@noreply.github.com Subject: [sails-generate-new-gulp] Fix Deprecation Warnings (#9)

Generating a new project and then 'sails lift' causes deprication warnings:

debug: Deprecation warning: Support for sails.config.sockets.onConnect will be removed in an upcoming release. See the v0.11 migration guide for more information and alternate options. debug: Deprecation warning: sails.config.sockets.onDisconnect is now sails.config.sockets.afterDisconnect Setting it for you this time, but note that the new afterDisconnect now receives an additional final argument (a callback). More info: http://sailsjs.org/#!/documentation/reference/sails.config/sails.config.sockets.html

Reply to this email directly or view it on GitHubhttps://github.com/Karnith/sails-generate-new-gulp/issues/9.

kevintechie commented 9 years ago

Nice. Thanks.

netlander commented 8 years ago

I am using the gulp generator from npm repository using:

$ npm install -g sails-generate-backend-gulp
$ npm install -g sails-generate-gulpfile
$ npm install -g sails-generate-frontend-gulp
$ npm install -g sails-generate-new-gulp

and getting the deprecation warnings:

warn: `sails.config.sockets.onConnect` has been deprecated, and support will be removed in an upcoming release. See the v0.11 migration guide for more information.
warn: (running it for you this time)

I'm also getting these warnings, not sure if they're related to the same issue:

warn: Socket disconnected, but session could not be loaded to pass to configured disconnect handler: `sails.config.sockets.afterDisconnect()`.  Will pass a fake, empty session as argument to lifecycle callback.  Details:
 Error: Session could not be loaded
    at _createError (C:\Users\maste_000\AppData\Roaming\npm\node_modules\sails\lib\hooks\session\index.js:271:21)
    at Immediate.<anonymous> (C:\Users\maste_000\AppData\Roaming\npm\node_modules\sails\lib\hooks\session\index.js:274:13)
    at Immediate.immediate._onImmediate (timers.js:425:18)
    at processImmediate [as _immediateCallback] (timers.js:368:17) { [Error: Session could not be loaded] code: 'E_SESSION' }

Should I be looking at downloading from a different location?

Karnith commented 8 years ago

@netlander Hi, yes the new module is machinepack-sailsgulpify https://github.com/Karnith/machinepack-sailsgulpify

netlander commented 8 years ago

But do you use this in an empty folder or a newly generated sails project?

Karnith commented 8 years ago

a newly generated sails project, or existing sails project should work also.

Karnith commented 8 years ago

the machinepack is added via npm, so there needs to be an existing project first.

netlander commented 8 years ago

Thanks