Open dedicated DevTools for Node
but my sails app is running under a vagrant vm and it's not connecting, i've forwarded the port to the vm guest from my host system, so i'm just doing a little exploratory at the minute to see why the connection is being refused :+1:
connection refused
, but when i telnet to the same port on the guest (where the node app with --inspect
flag is running) the connection opens, so it just must be a port forwarding issue..... sometimes the virtualbox config underneath vagrant decides to not update the port mappings when it should, i'm sure a manual tweak will probably fix it. Thanks for all your help dude :smile: :clap:
info: Starting app...
error: A hook (`userconfig`) failed to load!
error:
error: As of Sails v1, `sails.config.globals._` must be either `false` or a locally-installed version of Lodash (typically `require('lodash')`). For more info, see http://sailsjs.com/config/globals
error: Could not load Sails app.
error:
error: Tips:
error: • First, take a look at the error message above.
error: • Make sure you've installed dependencies with `npm install`.
error: • Check that this app was built for a compatible version of Sails.
error: • Have a question or need help? (http://sailsjs.com/support)
info: Starting app...
debug: The `config.views.engine` config has been deprecated.
debug: In Sails 1.x, use `config.views.extension` to choose your view
debug: extension (defaults to ".ejs"), and use `config.views.getRenderFn`
debug: to configure your template engine or leave it undefined to use
debug: the built-in EJS template support.
debug: The `sails.config.cors` config has been deprecated.
debug: Please use `sails.config.security.cors` instead.
debug: (we'll use your `sails.config.cors` settings for now).
debug: The `sails.config.connections` setting is deprecated. Please use `sails.config.datastores` instead.
debug: For more info, see http://sailsjs.com/documentation/upgrading/to-v-1-0/#?changes-to-database-configuration
info:
info: .-..-.
info:
info: Sails <| .-..-.
info: v1.0.0 |\
info: /|.\
info: / || \
info: ,' |' \
info: .-'.-==|/_--'
info: `--'-------'
info: __---___--___---___--___---___--___
info: ____---___--___---___--___---___--___-__
info:
info: Server lifted in `/home/marrom/smash_node-1.0`
info: To shut down Sails, press <CTRL> + C at any time.
info: Read more at https://sailsjs.com/support.
debug: -------------------------------------------------------
debug: :: Thu Mar 29 2018 22:19:52 GMT+0200 (CEST)
debug: Environment : development
debug: Port : 1337
debug: -------------------------------------------------------
error: ** Grunt :: An error occurred. **
error:
------------------------------------------------------------------------
Aborted due to warnings.
Loading "Gruntfile.js" tasks...ERROR
>> Error: Attempted to `require('/home/marrom/smash_node-1.0/tasks/config/watch.js')`, but an error occurred:
>> --
>> /home/marrom/smash_node-1.0/tasks/config/watch.js:26
>> tasks: ['syncAssets' , 'linkAssets' ]
>> ^
>>
>> SyntaxError: Unexpected token &
>> at createScript (vm.js:80:10)
>> at Object.runInThisContext (vm.js:139:10)
>> at Module._compile (module.js:616:28)
>> at Object.Module._extensions..js (module.js:663:10)
>> at Module.load (/home/marrom/smash_node-1.0/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
>> at tryModuleLoad (module.js:505:12)
>> at Function.Module._load (module.js:497:3)
>> at Module.require (module.js:596:17)
>> at require (internal/module.js:11:18)
>> at /home/marrom/smash_node-1.0/node_modules/include-all/lib/help-include-all-sync.js:293:33
>> at Array.forEach (<anonymous>:null:null)
>> at _recursivelyIncludeAll (/home/marrom/smash_node-1.0/node_modules/include-all/lib/help-include-all-sync.js:178:11)
>> at includeAll (/home/marrom/smash_node-1.0/node_modules/include-all/lib/help-include-all-sync.js:317:5)
>> at includeAllSync (/home/marrom/smash_node-1.0/node_modules/include-all/index.js:27:10)
>> at loadTasks (/home/marrom/smash_node-1.0/Gruntfile.js:46:12)
>> at Object.module.exports (/home/marrom/smash_node-1.0/Gruntfile.js:68:28)
>> at loadTask (/home/marrom/smash_node-1.0/node_modules/grunt/lib/grunt/task.js:318:10)
>> at Task.task.init (/home/marrom/smash_node-1.0/node_modules/grunt/lib/grunt/task.js:437:5)
>> at Object.grunt.tasks (/home/marrom/smash_node-1.0/node_modules/grunt/lib/grunt.js:111:8)
>> at Object.module.exports [as cli] (/home/marrom/smash_node-1.0/node_modules/grunt/lib/grunt/cli.js:27:9)
>> at Object.<anonymous> (/home/marrom/smash_node-1.0/node_modules/sails-hook-grunt/node_modules/grunt-cli/bin/grunt:44:20)
>> at Module._compile (module.js:652:30)
>> at Object.Module._extensions..js (module.js:663:10)
>> at Module.load (module.js:565:32)
>> at tryModuleLoad (module.js:505:12)
>> at Function.Module._load (module.js:497:3)
>> at Module.require (module.js:596:17)
>> at require (internal/module.js:11:18)
>> at Object.<anonymous> (/home/marrom/smash_node-1.0/node_modules/sails-hook-grunt/lib/grunt-wrapper.js:10:1)
>> at Module._compile (module.js:652:30)
>
MyFunctionName: async function (options, cb) {
await User.update({name: 'Mike'})
.set({
last_name: 'Williams'
})
}
'
-- I'm not able to reproduce that. Are you seeing it in a brand new project?
await
, you should completely eliminate this problem (unless -- much more unlikely -- your use case demands lots of streaming APIs, and the app code does not handle "error" events -- but in that case, def. check out sails-hook-uploads and the ration example app)
mysql
, which Doug maintains. Waterline's MySQL integration uses it as well.) Anyway, you can require those packages from any Node.js project, it has nothing to do with Express
sails-hook-organics
, sails-hook-uploads
, parasails
, and ration
repos
If your api or config folders and subfolders contain any non-source files, they’ll need to be moved. The exception is for Markdown (.md) and text (.txt) files, which will continue to be ignored. Sails will attempt to read all other files in those folders as code, allowing for more flexibility in choosing a Javascript dialect (see the notes about CoffeeScript and TypeScript above).