Cannot find module 'D:\build.js' #86

Closed
jordymeow opened this Issue Aug 3, 2012 · 8 comments

Comments

Projects
None yet
3 participants

Hello,

First, I would like to say that: I am all very new to all this, I intent to use Meteor, I have this issue only on Windows (all the install and everything was really smooth on OSX).

Apparently, there is an issue with fibers in the windows package of Meteor. Some people said that to do an npm uninstall and an npm install again and apparently it helps. Well, for me it spits out that error when I try to install it:

fibers@0.6.8 install C:\fiber
node ./build.js
 
module.js:340
throw err;
^
Error: Cannot find module 'D:\build.js'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.runMain (module.js:492:10)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
npm ERR! fibers@0.6.8 install: node ./build.js
npm ERR! cmd "/c" "node ./build.js" failed with 1

I tried to install a few more packages and it worked, so I guess there is an issue in the installation code of fibers. I tried to install fibers using npm install fibers, and also by downloading the package and using the command npm install in it. They fail exactly with the same error.

There is something strange in this error as well: 'D:\build.js". Why D:? Well my install of meteor is on D:, and D: is also my "HOME" drive (it might be important? not sure why though). But still I have no idea why build.js will be located at the root, obviously the path is missing here.

I have no idea where to look or how to debug this issue, so please tell me what to do and I'll try to debug.

Thanks a lot!

Owner

laverdet commented Aug 3, 2012

Hm, ok a couple things. First, could you post the whole output of npm install? Or is that it? There should also be a line that says like "/Users/marcel/npm-debug.log", if you could find that debug log and post it as well.

Secondly, you could try this.. Download this file: http://registry.npmjs.org/fibers/-/fibers-0.6.8.tgz and extract it. This should give you a folder called "package". Rename that folder to "fibers" and then put that inside the "node_modules" folder wherever your Meteor stuff is going.

First, I tried your package, and it works fine! So thank you a lot for that, I can start playing with Meteor on my Windows PC, this is great! About the output of the npm install, here it is:

D:\Meteor\lib>npm install fibers
npm http GET https://registry.npmjs.org/fibers
npm http 304 https://registry.npmjs.org/fibers

fibers@0.6.8 install D:\Meteor\lib\node_modules\fibers
node ./build.js

module.js:337
throw new Error("Cannot find module '" + request + "'");
^
Error: Cannot find module 'D:\build.js'
at Function._resolveFilename (module.js:337:11)
at Function._load (module.js:279:25)
at Array.0 (module.js:484:10)
at EventEmitter._tickCallback (node.js:190:38)

npm ERR! fibers@0.6.8 install: node ./build.js
npm ERR! cmd "/c" "node ./build.js" failed with 1
npm ERR!
npm ERR! Failed at the fibers@0.6.8 install script.
npm ERR! This is most likely a problem with the fibers package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./build.js
npm ERR! You can get their info via:
npm ERR! npm owner ls fibers
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "D:\Meteor\bin\node.exe" "D:\Meteor\bin\node_modules\n
pm\bin\npm-cli.js" "install" "fibers"
npm ERR! cwd D:\Meteor\lib
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.24
npm ERR! code ELIFECYCLE
npm ERR! message fibers@0.6.8 install: node ./build.js
npm ERR! message cmd "/c" "node ./build.js" failed with 1
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! D:\Meteor\lib\npm-debug.log
npm not ok
npm not ok

I can paste the whole npm-debug.log file here (related to the npm install) but it's a bit large... so here are the final lines:

info install fibers@0.6.8
verbose unsafe-perm in lifecycle true
silly exec cmd "/c" "node ./build.js"
silly spawning [ 'cmd',
silly spawning [ '/c', 'node ./build.js' ],
silly spawning 'D:\Meteor\lib\node_modules\fibers' ]
info fibers@0.6.8 Failed to exec install script
info unbuild D:\Meteor\lib\node_modules\fibers
verbose from cache D:\Meteor\lib\node_modules\fibers\package.json
info preuninstall fibers@0.6.8
info uninstall fibers@0.6.8
verbose unbuild fibers@0.6.8 [ true,
verbose unbuild fibers@0.6.8 'D:\Meteor\lib\node_modules',
verbose unbuild fibers@0.6.8 'D:\Meteor\lib\node_modules' ]
info postuninstall fibers@0.6.8
ERR! fibers@0.6.8 install: node ./build.js
ERR! cmd "/c" "node ./build.js" failed with 1
ERR!
ERR! Failed at the fibers@0.6.8 install script.
ERR! This is most likely a problem with the fibers package,
ERR! not with npm itself.
ERR! Tell the author that this fails on your system:
ERR! node ./build.js
ERR! You can get their info via:
ERR! npm owner ls fibers
ERR! There is likely additional logging output above.
ERR!
ERR! System Windows_NT 6.1.7601
ERR! command "D:\Meteor\bin\node.exe" "D:\Meteor\bin\node_modules\npm\bin\npm-cli.js" "install" "fibers"
ERR! cwd D:\Meteor\lib
ERR! node -v v0.6.19
ERR! npm -v 1.1.24
ERR! code ELIFECYCLE
ERR! message fibers@0.6.8 install: node ./build.js
ERR! message cmd "/c" "node ./build.js" failed with 1
ERR! errno {}
verbose exit [ 1, true ]

Does that help?
And thank you again :)

Owner

laverdet commented Aug 3, 2012

Ok cool yeah I figured manually installing it would work. There seems to be something weird about your node installation, maybe it has to do with what Meteor is doing?

What if you try this:
http://laverdet.com/fibers-test.tar.gz

The only difference between this and the build in npm is that I changed "node ./build.js" to "node build.js".

Owner

laverdet commented Aug 3, 2012

I meant that you should use npm install with that URL:

npm install http://laverdet.com/fibers-test.tar.gz

Okay, I tried, exactly the same issue. What else can I do to find the real issue? It is quite weird...

Owner

laverdet commented Aug 6, 2012

Oh I thought I had commented on this issue again but I guess I was mistaken. Anyway I'm not really sure what the problem is here. It seems like an issue with either Meteor's included node package or npm itself. It seems that any package that needs a postinstall script would have problems. Anyway I'm going to leave this one to the Meteor / npm community because as far as I can tell it's not a problem with Fibers.

TomWij commented Aug 26, 2012

Why did nobody call me yet?


throw new Error("Cannot find module '" + request + "'"); is a typical error that you get when it can't resolve any module, back in the days I got this for a multitude of reasons:

  1. The directory node_modules being in the wrong place.
  2. NODE_PATH not set correctly, hence it can't find the modules.
  3. Some weird random causes.

@tigroumeow:

I haven't seen it fail lately on the few testers that came across it, so:

  1. What Meteor package did you use? Have you tried the latest one?
  2. What version of Node.js are you using? What version and bitness of Windows are you using?
  3. Have you tried installing the latest one in Program Files, does that work better?

@laverdet:

Exactly, I experience Fibers as running fine on Windows (apart from support for 8, but compatibility works fine enough until it hits mainstream) and had only one user fail the tests in a similar way as Windows 8 would break it. But he was running Windows 7, have looked deep into that case but haven't seen any reason why his Fibers failed, worked on any other computer he tried.. So, in overall, one out of the 22+ failing seems fine in overall. Would love to see Windows 8 being supported in the future, when possible...

Owner

laverdet commented Jan 18, 2013

Not sure what the status of Windows 8 compatibility is at this point (still have Windows 7 and the only thing I do with it is run builds for fibers) but please open up a new ticket if that's still an issue now that W8 isn't beta anymore. As for Meteor enough has changed on the landscape of fibers & Meteor both to where I'm not sure this is even an issue anymore.

laverdet closed this Jan 18, 2013

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