Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
brookesb91
@brookesb91
@entvikas Ah, i get you, you most likely can but will have to create an adapter for it to work natively within sails
|56|69|6B|61|73|20|4B|61|6E|64|77|61|6C|D|A|56|69|6B|61|73|0D
@entvikas
@brookesb91 got it.... thanks .....seems like you are using sails from a long time
brookesb91
@brookesb91
@entvikas haha - I started using it about 1 & 1/2 years ago on v.11 i think - Had a few hiccups with it and was tempted to move to something else - decided to stick around after the v1 docs started appearing - love it now.
swshyamash
@swshyamash
Hello For which version of node and express js sprintfjs work? Do I need to install sprintfjs first or sails?
Osmel Guarepo
@osmelg
hello good morning
Alex
@flexage
Hey all, does anyone have any good resources on using the Chrome debug console with Sails? Had it working before when I used to start my apps with sails lift but have been using nodemon -L app.js since to watch for changes and restart - so I'm no longer sure how to start sails with the relevant options
biplob023051
@biplob023051
Hey all, "sails new test-project" never ends when I choose "Web App (Extensible project with auth, login, & password recovery)". Anyone can help please?
Clan-Utility
@Clan-Utility
@biplob023051 press Ctrl-C and check if test-project is created
If yes, enter test-project and run npm install
brookesb91
@brookesb91
@flexage would nodemon -L app.js && node app.js not work? Sorry if i’ve missed your point
biplob023051
@biplob023051
Ok, thanks @Clan-Utility
Yes, its working. Thank you very much @Clan-Utility
Jaydev vaghela
@jaydev943_twitter
Hi
How I can handle error globally So my server not crash ?
I am new in sails js.
Please help me..
Alex
@flexage
@brookesb91 what nodemon -L app.jsactually does is essentially run node app.js and watches the working directory for changes, as which point it terminates the sails app and restarts it, i'm using this in place of sails lift so that i can have the app automatically restart when the source changes, very handy for dev... what i could before using nodemon was to run sails debug instead of sails lift (https://sailsjs.com/documentation/reference/command-line-interface/sails-debug) which would start a debug session that I could connect to with the chrome developer tools, but i'm unsure how to pass the debug flag when not using the sails command line utils
brookesb91
@brookesb91
@flexage sorry, i understand now - I’m not currently using nodemon - wild guess but nodemon -L —inspect app.js doesn’t work, no?
Jaydev vaghela
@jaydev943_twitter
How I handle Error handling so my running server is not crash ?
Using script or package
Alex
@flexage
@brookesb91 I'm giving that a go now, the docs say it should work, i missed it in them until you said about --inspect, i can see it's spun up the debug server, but i'm having trouble getting the chrome dev tools to find it, I'll post here if i get it working :+1: thanks for the tip
brookesb91
@brookesb91
@flexage go to chrome://inspect and under devices you should see the debugger there
let me know how you get on
Alex
@flexage
@brookesb91 thanks that's where i am, and i've gone to the option for 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:
brookesb91
@brookesb91
@flexage excellent, sounds like you’re back on track!
Alex
@flexage
@brookesb91 thanks! i did a quick telnet on the debug port (9229) from the host to the guest vm and was getting 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:
brookesb91
@brookesb91
@flexage awesome stuff man! :D :clap:
Waiting on someone from Sails HQ to give me that support job
Alex
@flexage
:laughing: maybe send them beer
brookesb91
@brookesb91
Haha!
fabien thetis
@fabienthetis
Congratulations!
Mukul Sharma
@mukulsoftwap
Hi
I try to connect socket.io client (Android) with sails.js sockets gives error refuse connection
Mukul Sharma
@mukulsoftwap
how to implement sails.io with Native android
Marco Romano
@marcorom88_twitter
I try to install sails 1.0 but a I have a lot of errors... The beta i installed without errors some month ago, but 1. 0 stable with a lot of problems!
Marco Romano
@marcorom88_twitter
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)
and if I change global config I have others errors:
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' , &#39;linkAssets&#39; ]
>>                              ^
>> 
>> 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)
>
Marco Romano
@marcorom88_twitter
and if I choice installed web app do not installed any files and seems to 0.12 and not 1.0, all seems to be strange... I try 1.0 beta and works, and 1.0 stable do not work and seems different, I don't understand
Abrar Ahmed
@abrarahmedme
How can I use await functions inside for functions inside the model.
This is an example function inside a model
MyFunctionName: async function (options, cb) { await User.update({name: 'Mike'}) .set({ last_name: 'Williams' }) }
Tim Skaggs
@tskaggs
@marcorom88_twitter Did you try npm install -g sails@1.0.0?
Also I'm running on Node v9.10.0
Abrar Ahmed
@abrarahmedme
Suddenly it works now
Leo Montes
@leonardomontes
... just spent 1 hour trying to get a simple POST to work on v1 ... forfeit, going back to 0.12
Thomas Lepérou
@tleperou
@mikermcneil & all the team, congratulation! What a great news!
Mike McNeil
@mikermcneil
@leonardomontes too bad... if you want blueprints, generate your app as "Empty", or re-enable blueprints in your config. The "Web App" template disables them by default.
@marcorom88_twitter check out the upgrade tool if you haven't previously
Not sure why you're getting the &#39 -- I'm not able to reproduce that. Are you seeing it in a brand new project?
@jaydev943_twitter if you use 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)