Nov 22, 2017 16:15
Thanks again, huge help.
Nov 22, 2017 16:05
Solved, had to chown the folder and not start the application as root. I'll go ahead and accept your answer and add a comment, if you feel like upvoting my question I have no idea why I was downvoted....
Nov 22, 2017 15:49
okay: node -v is 8.9.1 sudo node -v is 6.11.2
Nov 22, 2017 15:38
sudo nvm is not a command...
Nov 22, 2017 15:38
okay idea, is it sudo vs non sudo
Nov 22, 2017 15:36
I have not registered it as a service
Nov 22, 2017 15:35
Getting same result with either forever start app.js, or sails lift (specific to sails)
Nov 22, 2017 15:06
now only have nvm
Nov 22, 2017 15:06
I removed n and its installs
Nov 22, 2017 15:03
node -v returns v8.9.1
Nov 22, 2017 15:03
which node returns ~/.nvm/versions/node/v8.9.1/bin/node
Nov 22, 2017 15:02
what should I do, I would prefer not restarting the os, but I guess that might be a good step
Nov 22, 2017 15:02
right.... or it thinks it is but is not
Nov 22, 2017 14:52
Still there, console.log(process.version) is returning 6.11 in my app
Nov 22, 2017 14:45
not at all appreciate your help, I'll ping this conversation.
Nov 22, 2017 14:42
I can't imagine this is centos specific though.
Nov 22, 2017 14:36
could a reboot or something be necessary, this is definitely specific to my centos box.
Nov 22, 2017 14:31
You are incredibly helpful. I think this may be something with my sails stack... as I did not get errors running a test.js file... but yes, it works fine on ubuntu, and windows setups I have.
Nov 22, 2017 14:24
test: async function (req, res){
return res.json({msg: "okay"});
},
Nov 22, 2017 14:24
or even:
Nov 22, 2017 14:21
but fails on my centos server
Nov 22, 2017 14:21
test: async function (req, res){
const user = await sails.models.user.findOne({id: 4});
return res.json(user);
},
Nov 22, 2017 14:21
This works great in my local machine:
Nov 22, 2017 14:06
I am now thinking I need to declare the express route as async to use await in the route....
Nov 22, 2017 14:05
so, I am pretty sure this is something sails related, although I have no idea why it works fine on other OS/machines with the same versions/code. I tried removing all my non working code and then adding the working code you sent and it still errors in sails.
Nov 22, 2017 13:42
There?
Nov 22, 2017 13:40
So async is.... technically working, it is something specific to my stack, sails/etc.?
Nov 22, 2017 13:40
Yes that works, and makes sense on the return
Nov 22, 2017 13:39
Hey thanks so much
Nov 22, 2017 13:38
That code runs without error, although if I add a console log as so out => { console.log(out); return Promise.resolve(out); } it is undefined. And there is a package.json in same directory.
Nov 22, 2017 13:38
Just switched to nvm and installed 8.9.1 everything worked on the nvm side, but same error in code, very odd.
Nov 22, 2017 13:38
No, I'm using N, should I use nvm instead?
Nov 22, 2017 13:38
This is true, unfortunately it was my simplified sample code, not my actual code, up-voted your answer and edited my question to include this missing closing brace.
 

HTML / CSS / WebDesign

This room is now defunct. RIP.
Nov 18, 2015 22:44
I could probably make something in node and just load the content of that site into my destination site, I think I may end up doing that, CMS systems seem like a hassle.
Nov 18, 2015 22:40
Hey, I'm looking to allow a couple static websites (not data driven) I am building to allow users to upload photos/text to a few areas. Looking into CMS a bit, but I don't want to build my site in a CMS system or give them full control, I want more of like a iframe or something that they have access to. Any ideas?
Oct 5, 2015 19:13
fascinating, great info, I think I'm getting to the bottom of it, strangely moving my necessary static fields (master record identifiers) to the top, seem to be making all the fields submit correctly. But I'll take all this advice into consideration for improvement. Also I'll console.log(dogshit) to try to avoid that happening in the case of error :' )
Oct 5, 2015 19:05
and a few thousand hidden input text fields with a word in it is actually fairly small I imagine, as far as request size goes.
Oct 5, 2015 19:04
rlemon, great idea, looking now, seems odd they would default to limiting it, but who knows.
Oct 5, 2015 19:00
or nope nope nope.
Oct 5, 2015 19:00
nope to bad design or nope to a limit in node.js/sails.js
Oct 5, 2015 18:59
Is it just generally bad design that I am submitting potentially thousands of inputs? Basically tons of users and a checkbox for each with a hidden input (for activating deactivating). I have a Datatables sortable list you can check or uncheck as many as you want and submit. In some cases there are a thousand or two users in said list.
Oct 5, 2015 18:48
its sails.js node.js
Oct 5, 2015 18:48
Is there a max number of inputs fields in a request? I have a dynamically generated form and it was working fine with a dozens of entries, but now when it creates a thousand or so, one of the req params turns undefined.
Sep 27, 2015 23:05
@joshhunt and sidesho, thanks thats helpful, I'll dig into it a bit.
Sep 27, 2015 22:49
sidesho, I was having a weird issue where a node.js post that takes quite some time parsing tens of thousands of CSV lines, performing calcs, and saving to Mongo, the browser seemed to be resubmitting the request after it completed. I have possibly resolved it however, I was just wondering if you had any time limit for a request to complete.
 

Node.js

Because you rock when you don't block
Oct 8, 2015 14:20
Anybody here, having issues installing node and npm on a linux server.
 

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
Oct 7, 2015 16:53
Probably a lodash question, but perhaps native would be good. I want to split an array into an unknown number of arrays based on if they have a matching parameter. For example {datapoint: "blah", date: "1/10/2000"}, now I don't know what/which dates will be in the set, but I want to make a new array for each unique date, and in that array put each object that has that date. Any good shortcuts/efficient ways?
Oct 7, 2015 12:30
characters, etc?
Oct 7, 2015 12:30
length I suppose would be something to check, but anything else?
Oct 7, 2015 12:30
Okay this question might be obvious, but is there a check for a valid string, and specifically for saving to MongoDB. Perhaps the answer is any string. I'm parsing a xls and want to be sure anything imputed can then be saved as a string.