tower-archive / tower

UNMAINTAINED - Small components for building apps, manipulating data, and automating a distributed infrastructure.
http://tower.github.io
MIT License
1.79k stars 120 forks source link

Windows install bug (0.4.2-4) #311

Closed ricick closed 12 years ago

ricick commented 12 years ago

npm install tower -g fails with this error on win7 64

C:\Users\Phil\AppData\Roaming\npm\tower -> C:\Users\Phil\AppData\Roaming\npm\nod
e_modules\tower\bin\tower

> tower@0.4.2-4 postinstall C:\Users\Phil\AppData\Roaming\npm\node_modules\tower

> $(./bin/dependencies)

'$' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! tower@0.4.2-4 postinstall: `$(./bin/dependencies)`
npm ERR! `cmd "/c" "$(./bin/dependencies)"` failed with 1
npm ERR!
npm ERR! Failed at the tower@0.4.2-4 postinstall script.
npm ERR! This is most likely a problem with the tower package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     $(./bin/dependencies)
npm ERR! You can get their info via:
npm ERR!     npm owner ls tower
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "c:\\Program Files (x86)\\nodejs\\node.exe" "c:\\Program Files
(x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "tower" "-g"
npm ERR! cwd C:\Users\Phil
npm ERR! node -v v0.8.1
npm ERR! npm -v 1.1.33
npm ERR! code ELIFECYCLE
npm ERR! message tower@0.4.2-4 postinstall: `$(./bin/dependencies)`
npm ERR! message `cmd "/c" "$(./bin/dependencies)"` failed with 1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\Phil\npm-debug.log
npm ERR! not ok code 0
lancejpollard commented 12 years ago

Looks like we're getting close :D

thehydroimpulse commented 12 years ago

@viatropos I'll take a look at the make.bat file. If it works on multiple machines then we can put the postinstall back in. Is this the last thing until 0.4.3?

lancejpollard commented 12 years ago

Yeah that's the last thing!

P.S. I'll update the site/workflow so we can keep the website roughly in sync with the wiki:

https://github.com/viatropos/towerjs.org/tree/master/public

Going to try and finish this today. Need some new design lol... Time for dribbble!

itegmark commented 12 years ago

OMG, it worked all the way down to node server. Well, I still needed to delete folder node_modules and do npm install again, but it worked!!

thehydroimpulse commented 12 years ago

@ginsent Nice! So everything works now?

ricick commented 12 years ago

All seems to install correctly.

node init myapp works fine

npm install inside the project works but gives the following warning (not sure if this is a problem):

> iconv@1.2.3 install c:\Users\Phil\projects\towertest3\node_modules\nodemailer\
node_modules\mailcomposer\node_modules\mimelib\node_modules\encoding\node_module
s\iconv
> node-gyp rebuild

c:\Users\Phil\projects\towertest3\node_modules\nodemailer\node_modules\mailcompo
ser\node_modules\mimelib\node_modules\encoding\node_modules\iconv>node "c:\nodej
s\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js
" rebuild
c:\Users\Phil\projects\towertest3\node_modules\nodemailer\node_modules\mailcomp
oser\node_modules\mimelib\node_modules\encoding\node_modules\iconv\build\iconv.
vcxproj(1,680): error MSB4019: The imported project "c:\Microsoft.Cpp.Default.p
rops" was not found. Confirm that the path in the <Import> declaration is corre
ct, and that the file exists on disk.
gyp ERR! rebuild error Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msb
uild.exe` failed with exit code: 1
gyp ERR! rebuild error     at ChildProcess.onExit (c:\nodejs\node_modules\npm\no
de_modules\node-gyp\lib\build.js:214:23)
gyp ERR! rebuild error     at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! rebuild error     at Process._handle.onexit (child_process.js:674:10)
gyp ERR! not ok
[ws v0.4.22] Native code compile failed (but the module will still work):
[ws v0.4.22] The native extensions are faster, but not required.
[ws v0.4.22] On Windows, native extensions require Visual Studio and Python.
[ws v0.4.22] On Unix, native extensions require Python, make and a C++ compiler.

[ws v0.4.22] Start npm with --ws:verbose to show compilation output (if any).
npm WARN optional dep failed, continuing iconv@1.2.3

node server starts up and runs on 3000, but going to http://localhost:3000/ I get 404 errors for all the javascript and stylesheets etc

GET http://localhost:3000/stylesheets/vendor/stylesheets/bootstrap/bootstrap.css 404 (Not Found) localhost:12
GET http://localhost:3000/stylesheets/vendor/stylesheets/prettify.css 404 (Not Found) localhost:13
GET http://localhost:3000/stylesheets/app/stylesheets/client/application.css 404 (Not Found) localhost:14
GET http://localhost:3000/javascripts/vendor/javascripts/underscore.js 404 (Not Found) localhost:18
GET http://localhost:3000/javascripts/vendor/javascripts/underscore.string.js 404 (Not Found) localhost:18
GET http://localhost:3000/javascripts/vendor/javascripts/moment.js 404 (Not Found) localhost:18
GET http://localhost:3000/javascripts/vendor/javascripts/geolib.js 404 (Not Found) localhost:18
GET http://localhost:3000/javascripts/vendor/javascripts/validator.js 404 (Not Found) localhost:18
GET http://localhost:3000/javascripts/vendor/javascripts/accounting.js 404 (Not Found) localhost:18
GET http://localhost:3000/javascripts/vendor/javascripts/inflection.js 404 (Not Found) localhost:18
GET http://localhost:3000/javascripts/vendor/javascripts/async.js 404 (Not Found) localhost:18
GET http://localhost:3000/javascripts/vendor/javascripts/socket.io.js 404 (Not Found) localhost:18
GET http://localhost:3000/javascripts/vendor/javascripts/handlebars.js 404 (Not Found) localhost:18
GET http://localhost:3000/javascripts/vendor/javascripts/ember.js 404 (Not Found) localhost:18
GET http://localhost:3000/javascripts/vendor/javascripts/jstorage.js 404 (Not Found) localhost:18
GET http://localhost:3000/javascripts/vendor/javascripts/tower.js 404 (Not Found) localhost:18
GET http://localhost:3000/javascripts/vendor/javascripts/bootstrap/bootstrap-dropdown.js 404 (Not Found) localhost:18
GET http://localhost:3000/javascripts/vendor/javascripts/mocha.js 404 (Not Found) localhost:18
GET http://localhost:3000/javascripts/vendor/javascripts/chai.js 404 (Not Found) localhost:18
GET http://localhost:3000/javascripts/test/client.js 404 (Not Found) localhost:18
GET http://localhost:3000/javascripts/app/config/shared/application.js 404 (Not Found) localhost:18
GET http://localhost:3000/javascripts/app/config/client/bootstrap.js 404 (Not Found) localhost:18
GET http://localhost:3000/javascripts/app/config/client/watch.js 404 (Not Found) localhost:18
GET http://localhost:3000/javascripts/app/config/shared/routes.js 404 (Not Found) localhost:18
GET http://localhost:3000/javascripts/templates.js 404 (Not Found) localhost:18
GET http://localhost:3000/javascripts/app/controllers/client/applicationController.js 404 (Not Found) localhost:18
GET http://localhost:3000/javascripts/app/views/client/layout/application.js 404 (Not Found) localhost:18
Uncaught ReferenceError: App is not defined localhost:100

Those paths look wrong. javascripts/vendor/javascripts/ i'm guessing is meant to be just javascripts/. Any ideas?

ricick commented 12 years ago

oops didnt mean to close sorry

lancejpollard commented 12 years ago

Looks like you're good to go, did you start the cake watch command? I think the assets just need to be compiled.

You'll have two windows, one running the server and one compiling/processing files when they change:

# first window
tower new app
cd app
npm install
tower generate scaffold post title:string body:text
node server
# second window
cd app
cake watch # or, if that fails which it shouldn't anymore, `grunt start --config grunt.coffee`

Alternatively, you can compile the assets on a one-off basis by running cake build instead of cake watch.

Does that solve it @ricick?

thehydroimpulse commented 12 years ago

The paths seem right. If you take a look at public/javascripts you'll see a vender folder and within that, you'll see another javascripts folder.

Did you run cake watch before running the server? It happened a few times to me.

And that error isn't an issue just a warning that you won't get the native (C / C++) module version. Instead you'll get the Javascript that is completely functional. The difference is just speed as stated in the message. If you want it to install the native modules, you'll need python, and Visual C++ 2010 (Though the 2012, renamed from 2011 beta, has the ability to use the 2010 compiler and features but it may not work correctly.).

thehydroimpulse commented 12 years ago

I guess @viatropos beat me to it! lol

ricick commented 12 years ago

Woohoo! all working. Excellent work guys!

lancejpollard commented 12 years ago

Awesome!!

lancejpollard commented 12 years ago

@TheHydroImpulse I'm going to bump 0.4.2-20 to 0.4.3 without the make.bat fix, unless you want to squeeze that in there (not necessary).