balderdashy / sails

Realtime MVC Framework for Node.js
https://sailsjs.com
MIT License
22.83k stars 1.95k forks source link

ENOENT installing sails on W7 64bit #235

Closed syntologica-1 closed 11 years ago

syntologica-1 commented 11 years ago

I reported this to npm but suspect it may be specific to sails, as I have installed many other packages without problems.

18838 silly exec cmd "/c" "(node-gyp rebuild 2> builderror.log) || (exit 0)" 18839 silly cmd,/c,(node-gyp rebuild 2> builderror.log) || (exit 0),c:\Dropbox\node\node_modules\sails\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws spawning 18840 error Error: spawn ENOENT 18840 error at errnoException (child_process.js:945:11) 18840 error at Process.ChildProcess._handle.onexit (child_process.js:736:34) 18841 error If you need help, you may report this log at: 18841 error http://github.com/isaacs/npm/issues 18841 error or email it to: 18841 error npm-@googlegroups.com 18842 error System Windows_NT 6.1.7600 18843 error command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "sails" 18844 error cwd c:\Dropbox\node 18845 error node -v v0.10.0 18846 error npm -v 1.2.14 18847 error syscall spawn 18848 error code ENOENT 18849 error errno ENOENT 18850 verbose exit [ 1, true ]

krzysztofantczak commented 11 years ago

It works under W7 32bit - just FYI.

mikermcneil commented 11 years ago

Thanks for reporting this @syntologica-1 -- I've seen some issues on Solaris with node-gyp.

Can you replicate on node 0.8.22, or is this issue 0.10.0 only?

syntologica-1 commented 11 years ago

I got the same error with 0.8.15 on Windows Server 2008.

On Sat, Mar 16, 2013 at 12:28 PM, Mike McNeil notifications@github.comwrote:

Thanks for reporting this @krzysztofantczak-- I've seen some issues on Solaris with node-gyp.

Can you replicate on node 0.8.22, or is this issue 0.10.0 only?

— Reply to this email directly or view it on GitHubhttps://github.com/balderdashy/sails/issues/235#issuecomment-15010695 .

mikermcneil commented 11 years ago

@syntologica-1 64 bit as well?

mikermcneil commented 11 years ago

And sorry guys, one more question: are you doing a global install?

syntologica-1 commented 11 years ago

I have not tried a global install.

WS2008 R2 Datacenter 64 bit (EC2)

On Sat, Mar 16, 2013 at 2:32 PM, Mike McNeil notifications@github.comwrote:

And sorry guys, one more question: are you doing a global install?

— Reply to this email directly or view it on GitHubhttps://github.com/balderdashy/sails/issues/235#issuecomment-15012641 .

mikermcneil commented 11 years ago

This seems like a permission issue-

On Sat, Mar 16, 2013 at 4:55 PM, syntologica-1 notifications@github.comwrote:

I have not tried a global install.

WS2008 R2 Datacenter 64 bit (EC2)

On Sat, Mar 16, 2013 at 2:32 PM, Mike McNeil notifications@github.comwrote:

And sorry guys, one more question: are you doing a global install?

— Reply to this email directly or view it on GitHub< https://github.com/balderdashy/sails/issues/235#issuecomment-15012641> .

— Reply to this email directly or view it on GitHubhttps://github.com/balderdashy/sails/issues/235#issuecomment-15012922 .

Mike McNeil Founder http://www.linkedin.com/in/mikermcneil/ http://twitter.com/mikermcneil http://github.com/balderdashy

   C      O
  NFI    DEN
  TIA   L i
  nfo  rma
  tion in
   tended
only for t      he addressee(s).

If you are not the intended recipient, empl oyee or agent responsible for delivery to the intended recipient(s), please be aware that any review, dissemination, use,distribut ion or copying of this message and its contents is strictly prohibited. If you receive this email in error, ple ase notify the sender and destroy any paper or electronic copies immediately.

syntologica-1 commented 11 years ago

I've installed many other packages without problems. Happy to try suggestions.

On Sat, Mar 16, 2013 at 2:57 PM, Mike McNeil notifications@github.comwrote:

This seems like a permission issue-

On Sat, Mar 16, 2013 at 4:55 PM, syntologica-1 notifications@github.comwrote:

I have not tried a global install.

WS2008 R2 Datacenter 64 bit (EC2)

On Sat, Mar 16, 2013 at 2:32 PM, Mike McNeil notifications@github.comwrote:

And sorry guys, one more question: are you doing a global install?

— Reply to this email directly or view it on GitHub< https://github.com/balderdashy/sails/issues/235#issuecomment-15012641> .

— Reply to this email directly or view it on GitHub< https://github.com/balderdashy/sails/issues/235#issuecomment-15012922> .

Mike McNeil Founder http://www.linkedin.com/in/mikermcneil/ http://twitter.com/mikermcneil

http://github.com/balderdashy

C O NFI DEN TIA L i nfo rma tion in tended only for t he addressee(s). If you are not the intended recipient, empl oyee or agent responsible for delivery to the intended recipient(s), please be aware that any review, dissemination, use,distribut ion or copying of this message and its contents is strictly prohibited. If you receive this email in error, ple ase notify the sender and destroy any paper or electronic copies immediately.

— Reply to this email directly or view it on GitHubhttps://github.com/balderdashy/sails/issues/235#issuecomment-15012952 .

mikermcneil commented 11 years ago

Seems like it's having trouble compiling socket.io client: http://stackoverflow.com/questions/14296094/get-socket-io-to-work-on-windows-7-x64-bit-platform

I'll keep poking around

mikermcneil commented 11 years ago

Installation of socket.io package on Windows 7 x64 bit environment seems to demand:

Cygwin C++ compiler Cygin C++ extra-library Microsoft Visual Studio 2010 Express Microsoft .NET Framework v2.0 Microsoft Performance Toolkit Microsoft Windows SDK 7.1 Microsoft Visual C++ 2010 SP1 Compiler Update for the Windows SDK 7.1.

mikermcneil commented 11 years ago

Although it seems like cygwin + g++ should work?

syntologica-1 commented 11 years ago

Ya those are runtime errors - I already fixed the stdint.h compilation error by installing .NET 3.5.

On Sat, Mar 16, 2013 at 3:03 PM, Mike McNeil notifications@github.comwrote:

Seems like it's having trouble compiling socket.io client:

http://stackoverflow.com/questions/14296094/get-socket-io-to-work-on-windows-7-x64-bit-platform

I'll keep poking around

— Reply to this email directly or view it on GitHubhttps://github.com/balderdashy/sails/issues/235#issuecomment-15013037 .

mikermcneil commented 11 years ago

Unfortunately a bit out of my area of expertise: any .NET users had this issue with node-gyp?

from https://github.com/TooTallNate/node-gyp:

On Windows:
Python (v2.7.3 recommended, v3.x.x is not supported)
Windows XP/Vista/7:
Microsoft Visual Studio C++ 2010 (Express version works well)
For 64-bit builds of node and native modules you will also need the Windows 7 64-bit SDK
If the install fails, try uninstalling any C++ 2010 x64&x86 Redistributable that you have installed first.
If you get errors that the 64-bit compilers are not installed you may also need the compiler update for the Windows SDK 7.1
Windows 8:
Microsoft Visual Studio C++ 2012 for Windows Desktop (Express version works well)

I'm happy to bundle whatever I need to with socket.io client to make this work. Have you been able to install socket.io with npm -g install socket.io?

syntologica-1 commented 11 years ago

Should have tried that already - I get the same error with socket.io

mikermcneil commented 11 years ago

Don't blame you, not necessarily intuitive that's what's happening :\ Want me to make an issue?

syntologica-1 commented 11 years ago

I went back to https://github.com/TooTallNate/node-gyp#installation and did all but the Windows 7 64 bit SDK as it did not seem applicable.

That got past my original problem, and up to the MSB4019 error listed in https://github.com/LearnBoost/socket.io/issues/1151 and https://github.com/TooTallNate/node-gyp/issues/213 - so I am trying the SDK now.

Will keep you posted.

On Sat, Mar 16, 2013 at 5:09 PM, Mike McNeil notifications@github.comwrote:

Don't blame you, not necessarily intuitive that's what's happening :\ Want me to make an issue?

— Reply to this email directly or view it on GitHubhttps://github.com/balderdashy/sails/issues/235#issuecomment-15014603 .

syntologica-1 commented 11 years ago

After installing the SDK (minimal set of components excluding Studio includes) I was able to install socket.io with only warnings as shown immediately below. Further down is the log for sails - also only warnings. However when I try "sails new testProject" I get an error message that sails is undefined.

c:\Dropbox\node>npm install socket.io npm WARN package.json jquery@1.6.3 No README.md file found! npm http GET https://registry.npmjs.org/socket.io npm http 304 https://registry.npmjs.org/socket.io npm http GET https://registry.npmjs.org/socket.io-client/0.9.11 npm http GET https://registry.npmjs.org/policyfile/0.0.4 npm http GET https://registry.npmjs.org/base64id/0.1.0 npm http GET https://registry.npmjs.org/redis/0.7.3 npm http 304 https://registry.npmjs.org/socket.io-client/0.9.11 npm http 304 https://registry.npmjs.org/policyfile/0.0.4 npm http 304 https://registry.npmjs.org/base64id/0.1.0 npm http 304 https://registry.npmjs.org/redis/0.7.3 npm http GET https://registry.npmjs.org/uglify-js/1.2.5 npm http GET https://registry.npmjs.org/ws npm http GET https://registry.npmjs.org/xmlhttprequest/1.4.2 npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1 npm http 304 https://registry.npmjs.org/ws npm http 304 https://registry.npmjs.org/uglify-js/1.2.5 npm http 304 https://registry.npmjs.org/xmlhttprequest/1.4.2 npm http 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1 npm http GET https://registry.npmjs.org/zeparser/0.0.5 npm http GET https://registry.npmjs.org/tinycolor npm http GET https://registry.npmjs.org/commander npm http GET https://registry.npmjs.org/options npm http 304 https://registry.npmjs.org/commander npm http 304 https://registry.npmjs.org/options npm http 304 https://registry.npmjs.org/zeparser/0.0.5 npm http 304 https://registry.npmjs.org/tinycolor

ws@0.4.25 install c:\Dropbox\node\node_modules\socket.io\node_modules\socket.i o-client\node_modules\ws (node-gyp rebuild 2> builderror.log) || (exit 0)

c:\Dropbox\node\node_modules\socket.io\node_modules\socket.io-client\node_module s\ws>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node _modules\node-gyp\bin\node-gyp.js" rebuild bufferutil.cc ..\src\bufferutil.cc(55): warning C4267: 'initializing' : conversion from 'size _t' to 'unsigned int', possible loss of data [c:\Dropbox\node\node_modules\sock et.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj] ..\src\bufferutil.cc(66): warning C4267: 'initializing' : conversion from 'size _t' to 'unsigned int', possible loss of data [c:\Dropbox\node\node_modules\sock et.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj] C:\Users\admin1.node-gyp\0.10.0\deps\v8\include\v8.h(184): warning C4506: no d efinition for inline function 'v8::Persistent v8::Persistent::New(v8::Han dle)' [c:\Dropbox\node\node_modules\socket.io\node_modules\socket.io-client\ node_modules\ws\build\bufferutil.vcxproj] with [ T=v8::Object ] Creating library c:\Dropbox\node\node_modules\socket.io\node_modules\socke t.io-client\node_modules\ws\build\Release\bufferutil.lib and object c:\Dropbo x\node\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\b uild\Release\bufferutil.exp Generating code Finished generating code bufferutil.vcxproj -> c:\Dropbox\node\node_modules\socket.io\node_modules\soc ket.io-client\node_modules\ws\build\Release\bufferutil.node validation.cc C:\Users\admin1.node-gyp\0.10.0\deps\v8\include\v8.h(184): warning C4506: no d efinition for inline function 'v8::Persistent v8::Persistent::New(v8::Han dle)' [c:\Dropbox\node\node_modules\socket.io\node_modules\socket.io-client\ node_modules\ws\build\validation.vcxproj] with [ T=v8::Object ] Creating library c:\Dropbox\node\node_modules\socket.io\node_modules\socke t.io-client\node_modules\ws\build\Release\validation.lib and object c:\Dropbo x\node\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\b uild\Release\validation.exp Generating code Finished generating code validation.vcxproj -> c:\Dropbox\node\node_modules\socket.io\node_modules\soc ket.io-client\node_modules\ws\build\Release\validation.node npm WARN package.json cssom@0.2.3 No README.md file found! socket.io@0.9.13 node_modules\socket.io ├── base64id@0.1.0 ├── policyfile@0.0.4 ├── redis@0.7.3 └── socket.io-client@0.9.11 (xmlhttprequest@1.4.2, uglify-js@1.2.5, active-x-obf uscator@0.0.1, ws@0.4.25)

For the npm install sails I got the above warnings followed by:

npm http 304 https://registry.npmjs.org/pkginfo npm http 304 https://registry.npmjs.org/eventemitter2 npm http 304 https://registry.npmjs.org/utile npm http 304 https://registry.npmjs.org/request npm http 304 https://registry.npmjs.org/filed/0.0.7 npm http 304 https://registry.npmjs.org/morestreams npm http 304 https://registry.npmjs.org/xml2js npm http 304 https://registry.npmjs.org/errs npm WARN package.json morestreams@0.1.1 No README.md file found! npm http GET https://registry.npmjs.org/deep-equal npm http GET https://registry.npmjs.org/mkdirp npm http GET https://registry.npmjs.org/i npm http GET https://registry.npmjs.org/ncp npm http GET https://registry.npmjs.org/rimraf npm http GET https://registry.npmjs.org/sax npm http GET https://registry.npmjs.org/qs npm http GET https://registry.npmjs.org/form-data npm http GET https://registry.npmjs.org/oauth-sign npm http GET https://registry.npmjs.org/tunnel-agent npm http GET https://registry.npmjs.org/forever-agent npm http GET https://registry.npmjs.org/json-stringify-safe npm http GET https://registry.npmjs.org/aws-sign npm http GET https://registry.npmjs.org/cookie-jar npm http GET https://registry.npmjs.org/hawk npm http 304 https://registry.npmjs.org/deep-equal npm http 304 https://registry.npmjs.org/ncp npm http 304 https://registry.npmjs.org/rimraf npm http 304 https://registry.npmjs.org/mkdirp npm http 304 https://registry.npmjs.org/i validation.cc npm http 304 https://registry.npmjs.org/sax npm http 304 https://registry.npmjs.org/qs npm http 304 https://registry.npmjs.org/oauth-sign npm http 304 https://registry.npmjs.org/form-data npm http 304 https://registry.npmjs.org/tunnel-agent npm WARN package.json tunnel-agent@0.2.0 No README.md file found! npm WARN package.json oauth-sign@0.2.0 No README.md file found! npm http 304 https://registry.npmjs.org/forever-agent npm http 304 https://registry.npmjs.org/json-stringify-safe npm http 304 https://registry.npmjs.org/cookie-jar npm http 304 https://registry.npmjs.org/aws-sign npm http 304 https://registry.npmjs.org/hawk npm WARN package.json forever-agent@0.2.0 No README.md file found! npm WARN package.json cookie-jar@0.2.0 No README.md file found! npm WARN package.json aws-sign@0.2.0 No README.md file found! npm http GET https://registry.npmjs.org/nopt C:\Users\admin1.node-gyp\0.10.0\deps\v8\include\v8.h(184): warning C4506: no d efinition for inline function 'v8::Persistent v8::Persistent::New(v8::Han dle)' [c:\Dropbox\node\node_modules\sails\node_modules\socket.io\node_module s\socket.io-client\node_modules\ws\build\validation.vcxproj] with [ T=v8::Object ] npm WARN engine hawk@0.10.1: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.0 ","npm":"1.2.14"}) Creating library c:\Dropbox\node\node_modules\sails\node_modules\socket.io \node_modules\socket.io-client\node_modules\ws\build\Release\validation.lib a nd object c:\Dropbox\node\node_modules\sails\node_modules\socket.io\node_modu les\socket.io-client\node_modules\ws\build\Release\validation.exp Generating code Finished generating code npm http GET https://registry.npmjs.org/combined-stream npm http GET https://registry.npmjs.org/sntp npm http GET https://registry.npmjs.org/cryptiles npm http GET https://registry.npmjs.org/hoek npm http GET https://registry.npmjs.org/boom validation.vcxproj -> c:\Dropbox\node\node_modules\sails\node_modules\socket. io\node_modules\socket.io-client\node_modules\ws\build\Release\validation.no de npm http 304 https://registry.npmjs.org/nopt npm http 304 https://registry.npmjs.org/boom npm http GET https://registry.npmjs.org/abbrev npm http 304 https://registry.npmjs.org/combined-stream npm http 304 https://registry.npmjs.org/cryptiles npm http 304 https://registry.npmjs.org/sntp npm http 304 https://registry.npmjs.org/hoek npm WARN engine boom@0.3.6: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.0" ,"npm":"1.2.14"}) npm WARN engine cryptiles@0.1.2: wanted: {"node":"0.8.x"} (current: {"node":"v0. 10.0","npm":"1.2.14"}) npm WARN engine sntp@0.1.3: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.0" ,"npm":"1.2.14"}) npm WARN engine hoek@0.6.2: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.0" ,"npm":"1.2.14"}) npm http 304 https://registry.npmjs.org/abbrev npm WARN engine hoek@0.4.5: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.0" ,"npm":"1.2.14"}) npm http GET https://registry.npmjs.org/delayed-stream/0.0.5 npm http 304 https://registry.npmjs.org/delayed-stream/0.0.5 npm WARN package.json cssom@0.2.3 No README.md file found! sails@0.8.894 node_modules\sails ├── parley@0.0.2 ├── wrench@1.4.4 ├── underscore.string@2.3.0 ├── underscore@1.4.2 ├── include-all@0.0.5 ├── ejs@0.7.2 ├── i18n@0.3.5 (sprintf@0.1.1) ├── optimist@0.3.4 (wordwrap@0.0.2) ├── fs-extra@0.5.0 (ncp@0.2.7, jsonfile@0.0.1, mkdirp@0.3.5, rimraf@2.1.4) ├── connect@1.8.3 (mime@1.2.9, qs@0.5.4) ├── express@2.5.11 (mime@1.2.4, qs@0.4.2, mkdirp@0.3.0) ├── clean-css@0.10.1 (commander@1.1.1) ├── less@1.3.0 ├── sails-dirty@0.7.2 (underscore@1.4.4, underscore.string@2.3.1, dirty@0.9.6, f s-extra@0.3.2) ├── glob@3.1.14 (inherits@1.0.0, graceful-fs@1.1.14, minimatch@0.2.11) ├── uglify-js@2.2.4 (source-map@0.1.9, optimist@0.3.5) ├── jade@0.28.0 (commander@0.6.1, mkdirp@0.3.5, coffee-script@1.4.0) ├── winston@0.6.2 (eyes@0.1.8, colors@0.6.0-1, cycle@1.0.2, pkginfo@0.2.3, stack -trace@0.0.6, request@2.9.203) ├── fs-watch-tree@0.2.2 (when@1.3.0) ├── forever@0.10.0 (timespan@2.0.1, pkginfo@0.2.3, watch@0.5.1, cliff@0.1.8, nss ocket@0.3.8, utile@0.1.2, nconf@0.6.1, flatiron@0.2.3, forever-monitor@1.0.1) ├── socket.io@0.9.6 (policyfile@0.0.4, redis@0.6.7, socket.io-client@0.9.6) └── asset-rack@2.0.6 (mime@1.2.7, underscore@1.4.4, coffee-script@1.4.0, nib@0.9 .1, jade@0.27.7, snockets@1.3.8, stylus@0.32.0, browserify@1.17.3, less@1.3.3, m arkdown@0.4.0, pkgcloud@0.6.6)

mikermcneil commented 11 years ago

Seems like sails never made it into your path. Did you do npm install -g sails?

If you've already done that, you might try running sails directly from your global node_modules directory- on os x, by default that's in /usr/local/lib/node_modules/ Not sure about windows off hand

syntologica-1 commented 11 years ago

Tried both, no luck.

There is nothing that would run on Windows command line as "sails" in either case.

On Sat, Mar 16, 2013 at 10:22 PM, Mike McNeil notifications@github.comwrote:

Seems like sails never made it into your path. Did you do npm install -g sails?

If you've already done that, you might try running sails directly from your global node_modules directory- on os x, by default that's in /usr/local/lib/node_modules/

— Reply to this email directly or view it on GitHubhttps://github.com/balderdashy/sails/issues/235#issuecomment-15017690 .

dcbartlett commented 11 years ago

does it launch from the app folder with "node .app.js" ?

mikermcneil commented 11 years ago

@dcbartlett He's unable to make a new project so he hasn't gotten that far yet

@syntologica-1 Are you able to do a global install of any other modules, like Express for instance?

dcbartlett commented 11 years ago

well thats true... i'm used to my method of cloning my clean project.

mikermcneil commented 11 years ago

Oh yeah, maybe try that for the immediate term? @dcbartlett got a repo?

syntologica-1 commented 11 years ago

Yes:

c:\Dropbox\node>npm install -g express npm http GET https://registry.npmjs.org/express npm http 304 https://registry.npmjs.org/express npm http GET https://registry.npmjs.org/connect/2.7.2 npm http GET https://registry.npmjs.org/commander/0.6.1 npm http GET https://registry.npmjs.org/range-parser/0.0.4 npm http GET https://registry.npmjs.org/buffer-crc32/0.1.1 npm http GET https://registry.npmjs.org/methods/0.0.1 npm http GET https://registry.npmjs.org/mkdirp/0.3.3 npm http GET https://registry.npmjs.org/send/0.1.0 npm http GET https://registry.npmjs.org/fresh/0.1.0 npm http GET https://registry.npmjs.org/cookie-signature/0.0.1 npm http GET https://registry.npmjs.org/debug npm http GET https://registry.npmjs.org/cookie/0.0.5 npm http 304 https://registry.npmjs.org/commander/0.6.1 npm http 304 https://registry.npmjs.org/range-parser/0.0.4 npm http 304 https://registry.npmjs.org/connect/2.7.2 npm http 304 https://registry.npmjs.org/methods/0.0.1 npm WARN package.json methods@0.0.1 No README.md file found! npm http 304 https://registry.npmjs.org/send/0.1.0 npm http 304 https://registry.npmjs.org/mkdirp/0.3.3 npm http 304 https://registry.npmjs.org/fresh/0.1.0 npm http 304 https://registry.npmjs.org/buffer-crc32/0.1.1 npm http 304 https://registry.npmjs.org/cookie-signature/0.0.1 npm http 304 https://registry.npmjs.org/debug npm http 304 https://registry.npmjs.org/cookie/0.0.5 npm http GET https://registry.npmjs.org/mime/1.2.6 npm http 304 https://registry.npmjs.org/mime/1.2.6 npm http GET https://registry.npmjs.org/qs/0.5.1 npm http GET https://registry.npmjs.org/formidable/1.0.11 npm http GET https://registry.npmjs.org/bytes/0.1.0 npm http GET https://registry.npmjs.org/pause/0.0.1 npm http 304 https://registry.npmjs.org/qs/0.5.1 npm http 304 https://registry.npmjs.org/formidable/1.0.11 npm http 304 https://registry.npmjs.org/pause/0.0.1 npm http 304 https://registry.npmjs.org/bytes/0.1.0 C:\Users\admin1\AppData\Roaming\npm\express -> C:\Users\admin1\AppData\Roaming\n pm\node_modules\express\bin\express express@3.1.0 C:\Users\admin1\AppData\Roaming\npm\node_modules\express ├── methods@0.0.1 ├── fresh@0.1.0 ├── cookie@0.0.5 ├── buffer-crc32@0.1.1 ├── range-parser@0.0.4 ├── debug@0.7.2 ├── cookie-signature@0.0.1 ├── commander@0.6.1 ├── mkdirp@0.3.3 ├── send@0.1.0 (mime@1.2.6) └── connect@2.7.2 (pause@0.0.1, bytes@0.1.0, qs@0.5.1, formidable@1.0.11)

On Sat, Mar 16, 2013 at 11:25 PM, Mike McNeil notifications@github.comwrote:

@dcbartlett https://github.com/dcbartlett He's unable to make a new project so he hasn't gotten that far yet

@syntologica-1 https://github.com/syntologica-1 Are you able to do a global install of any other modules, like Express for instance?

— Reply to this email directly or view it on GitHubhttps://github.com/balderdashy/sails/issues/235#issuecomment-15018208 .

mikermcneil commented 11 years ago

@syntologica-1 Are you able to use Express from the command line? e.g. express newAppName

syntologica-1 commented 11 years ago

Nope

On Sun, Mar 17, 2013 at 5:05 PM, Mike McNeil notifications@github.comwrote:

@syntologica-1 https://github.com/syntologica-1 Are you able to use Express from the command line? e.g. express newAppName

— Reply to this email directly or view it on GitHubhttps://github.com/balderdashy/sails/issues/235#issuecomment-15034149 .

dcbartlett commented 11 years ago

Repo is at https://github.com/dcbartlett/sails-empty

dcbartlett commented 11 years ago

i don't think that my repo will help much though, if you don't have a usable path you probably won't be able to do node .app.js either. It seems to me that none of the installed apps are finding their way into your path.

syntologica-1 commented 11 years ago

What additional path segment(s) should I see from installing sails?

Thanks

John

On Wed, Mar 20, 2013 at 6:52 PM, Dennis Bartlett notifications@github.comwrote:

i don't think that my repo will help much though, if you don't have a usable path you probably won't be able to do node .app.js either. It seems to me that none of the installed apps are finding their way into your path.

— Reply to this email directly or view it on GitHubhttps://github.com/balderdashy/sails/issues/235#issuecomment-15215260 .

syntologica-1 commented 11 years ago

I got sails working properly by starting over with node 0.8.15.

BTW is there a doc page that describes e.g. how to update a model or even how to specify initial parameters? I did not see it in the wiki.

Thanks

John

On Sun, Mar 17, 2013 at 5:05 PM, Mike McNeil notifications@github.comwrote:

@syntologica-1 https://github.com/syntologica-1 Are you able to use Express from the command line? e.g. express newAppName

— Reply to this email directly or view it on GitHubhttps://github.com/balderdashy/sails/issues/235#issuecomment-15034149 .

mikermcneil commented 11 years ago

@syntologica-1 Glad it's up! :+1:

Here's the relevant section on updating models from the wiki-- this sort of code might go in your controller:

https://github.com/balderdashy/sails/wiki/Models

update
update() allows you to update an instance of a model from the database.

// For example, to update a user's name, 
// .update(query, params to change, callback)
User.update({
  name: 'sally'
},{
  phone: '555-555-5555'
}, function(err, user) {
  // Error handling
  if (err) {
    return console.log(err);
  // Updated user successfully!
  } else {
    console.log("User updated:", user);
  }
});

Alternatively, if you do:

sails generate modelName

An empty model and controller will be created. Then, doing:

# Update the user with id 1
http://localhost:1337/user/update/1
(or send an HTTP PUT to http://localhost:1337/user/1)

with RESTful conventions will allow you to update the modelName without writing any code.

Hope that helps! Dunno if you're in this camp or not, but either way, we're working to do a better job introducing these concepts for folks new to MVC and REST-- for now, there are more resources on REST here (http://backbonejs.org/#Sync) and MVC here (http://en.wikipedia.org/wiki/Grails_(framework))

mikermcneil commented 11 years ago

Closing for now!

@dcbartlett Would you take a sanity pass through the docs and make sure our examples for update are sufficient?

syntologica-1 commented 11 years ago

I may have some basic misconceptions about how sails is supposed to work. When you generate a model, is there a way to specify its attributes at the same time? For example, if I say sails generate user, can I include command line parameters to indicate that each user has a name, address, etc.? And can PUT and POST operations carry parameters in the body e.g. JSON or only as ?name=xxx style?

On Sat, Mar 30, 2013 at 2:37 PM, Mike McNeil notifications@github.comwrote:

Closing for now!

@dcbartlett https://github.com/dcbartlett Would you take a sanity pass through the docs and make sure our examples for update are sufficient?

— Reply to this email directly or view it on GitHubhttps://github.com/balderdashy/sails/issues/235#issuecomment-15682363 .

mikermcneil commented 11 years ago

Would you mind sending this to the google group? I'm out at the moment but ill follow up with an answer re creating models with attributes. You can also modify the model files themselves in api/models

Re params- yep, JSON and query params both work :)

Mike's phone

On Mar 30, 2013, at 18:52, syntologica-1 notifications@github.com wrote:

I may have some basic misconceptions about how sails is supposed to work. When you generate a model, is there a way to specify its attributes at the same time? For example, if I say sails generate user, can I include command line parameters to indicate that each user has a name, address, etc.? And can PUT and POST operations carry parameters in the body e.g. JSON or only as ?name=xxx style?

On Sat, Mar 30, 2013 at 2:37 PM, Mike McNeil notifications@github.comwrote:

Closing for now!

@dcbartlett https://github.com/dcbartlett Would you take a sanity pass through the docs and make sure our examples for update are sufficient?

— Reply to this email directly or view it on GitHubhttps://github.com/balderdashy/sails/issues/235#issuecomment-15682363 .

— Reply to this email directly or view it on GitHub.

syntologica-1 commented 11 years ago

OK will do, thanks.

On Sat, Mar 30, 2013 at 6:13 PM, Mike McNeil notifications@github.comwrote:

Would you mind sending this to the google group? I'm out at the moment but ill follow up with an answer re creating models with attributes. You can also modify the model files themselves in api/models

Re params- yep, JSON and query params both work :)

Mike's phone

On Mar 30, 2013, at 18:52, syntologica-1 notifications@github.com wrote:

I may have some basic misconceptions about how sails is supposed to work. When you generate a model, is there a way to specify its attributes at the same time? For example, if I say sails generate user, can I include command line parameters to indicate that each user has a name, address, etc.? And can PUT and POST operations carry parameters in the body e.g. JSON or only as ?name=xxx style?

On Sat, Mar 30, 2013 at 2:37 PM, Mike McNeil notifications@github.comwrote:

Closing for now!

@dcbartlett https://github.com/dcbartlett Would you take a sanity pass through the docs and make sure our examples for update are sufficient?

— Reply to this email directly or view it on GitHub< https://github.com/balderdashy/sails/issues/235#issuecomment-15682363> .

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/balderdashy/sails/issues/235#issuecomment-15684909 .