New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.4.2] Windows 7 Cannot npm install Meteor build bundle #8007

Closed
rclai opened this Issue Nov 2, 2016 · 7 comments

Comments

Projects
None yet
3 participants
@rclai

rclai commented Nov 2, 2016

My .meteor/packages, if important:

meteor-base@1.0.4    
mobile-experience@1.0.4    
mongo@1.1.14      
blaze-html-templates@1.0.4 
reactive-var@1.0.11  
jquery@1.11.10         
tracker@1.1.1                 
standard-minifier-css@1.3.2  
standard-minifier-js@1.2.1   
es5-shim@4.6.15               
ecmascript@0.5.9              
shell-server@0.2.1            
http
check
audit-argument-checks
session
iron:router
twbs:bootstrap
raix:handlebar-helpers
codechimera:meteor-bootstrap-sweetalert
less
dburles:collection-helpers
lai:document-methods
reywood:publish-composite

I'm using Node 4.6.1 that was installed via nvm-windows.

I did meteor build like this:

meteor build --directory ../production --server-only --server http://myserver.com:8545

This is what happened when I tried npm installing the app:

C:\MyApp\production\bundle\programs\server>npm install
npm WARN package.json meteor-dev-bundle@0.0.0 No description
npm WARN package.json meteor-dev-bundle@0.0.0 No repository field.
npm WARN package.json meteor-dev-bundle@0.0.0 No README data
npm WARN package.json meteor-dev-bundle@0.0.0 No license field.
/
> meteor-dev-bundle@0.0.0 install C:\MyApp\production\bundle\programs\server

> node npm-rebuild.js

events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: spawn npm ENOENT
    at exports._errnoException (util.js:907:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at nextTickCallbackWith2Args (node.js:442:9)
    at process._tickCallback (node.js:356:17)
    at Function.Module.runMain (module.js:443:11)
    at startup (node.js:139:18)
    at node.js:974:3

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.6.1
npm ERR! npm  v2.15.9
npm ERR! code ELIFECYCLE
npm ERR! meteor-dev-bundle@0.0.0 install: `node npm-rebuild.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the meteor-dev-bundle@0.0.0 install script 'node npm-rebuild.
js'.
npm ERR! This is most likely a problem with the meteor-dev-bundle package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node npm-rebuild.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs meteor-dev-bundle
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls meteor-dev-bundle
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\MyApp\production\bundle\programs\server\npm-debug.log
@benjamn

This comment has been minimized.

Member

benjamn commented Nov 2, 2016

What are the contents of bundle\programs\server\npm-rebuilds.json?

Since you're on Windows, I wonder if #7960 might be affecting the rebuild. If so, you may be able to install Python on your machine (if not already there) and set the PYTHON environment variable to the absolute path to python.exe.

@rclai

This comment has been minimized.

rclai commented Nov 2, 2016

There was just an empty array in npm-rebuilds.json:

[]

But a workaround I'm doing for now is just removing

"scripts": {
  "install": "node npm-rebuild.js"
}

from package.json since it didn't really seem to be critical? npm install worked and the app ran.

I'll try the Python thing later.

@benjamn

This comment has been minimized.

Member

benjamn commented Nov 2, 2016

Ok, good to know. When you run node, if you examine process.execPath, does the directory that contains the node.exe program also contain an npm or npm.cmd program?

@benjamn benjamn added this to the Release 1.4.2.1 milestone Nov 2, 2016

@benjamn benjamn self-assigned this Nov 2, 2016

@ramijarrar

This comment has been minimized.

ramijarrar commented Nov 3, 2016

I don't think this was introduced recently - we've seen this issue on Windows for a while (e.g this thread) and the usual protocol has always been to strip out the install script from package.json as per @RichardLitt's comment.

@rclai

This comment has been minimized.

rclai commented Nov 3, 2016

@benjamn when I examined process.execPath, I see 'C:\\Program Files\\nodejs\\node.exe'. And yes, npm and npm.cmd are both there in that directory.

@benjamn benjamn closed this in 19fdc5c Nov 3, 2016

@rclai

This comment has been minimized.

rclai commented Nov 3, 2016

Is the Python thing still needed or is not related to this issue at all?

@benjamn

This comment has been minimized.

Member

benjamn commented Nov 3, 2016

I now believe the Python issue is unrelated. Thanks for asking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment