Meteor on Windows: runs in dev mode but not compiled

steps to reprudce:

Meteor 1.0, windows 8.1
meteor create appy
cd appy
meteor

works

meteor build …build
cd .build\bundle
node main.js

ERROR:

module.js:340
throw err;
^
Error: Cannot find module 'fibers’
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (M:.buildy\bundle\programs\server\boot.js:1:75)
at Module._compile (module.js:456:26)
at Object.Module._extensions…js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)

what i tried:

  1. npm install fibers
    this gives me a linker error

and 2. copy the fibers folder in node_modules from C:\Users\me\AppData\Local.meteor\packages\meteor-tool\1.3.4_1\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers
to the node_modules folder in the build directory

does not change anything

Have you tested that the build on windows works?

i have node version 0.10.41

You may find this useful:

well, i read all this, i understand all this, i have all installed. yet fibers does not compile.

i found several threads of problems with fibers, i thought someone from the meteor team has an opinion about the fibers issue. maybe i should create a new topic just asking about a solution with the node-fibers problem.

Building the fibers module is platform specific. Have you met all the requirements for node-gyp here:

You should also check the version of npm you’re using is compatible with the version of node you have.

actually i thnk after many many hours, the versions i have are right for meteor, but not to build fibers.

i switched to the vs2015 tool chain, via

npm config set msvs_version 2015

with the result that

npm install fibers
or
npm install fibers@1.0.3 (this is the version used by the running meteor dev environment)

complains about incompatible build environment. although

recommends exactly this. I assume, it does not work, since at the same time, meteor requires me to use the old node and npm. so i am really frustrated and thought the person who built fibers binary that runs inside meteor dev environment could help here.

Not sure how much help this is, but I am pretty sure that version of Fibers is NOT the actual real version being used in Meteor Dev (or otherwise). Meteor forked fibers a long time ago – not sure they have kept it up – but the version I remember it being was a fork of 1.0.5, not 1.0.3. Also – I think you need to make absolutely sure you are pulling the Meteor fibers, not the stock Lavadet fibers package.

Maybe I missed it, but when you say Fibers won’t compile – I don’t remember seeing any of the output from the attempt to compile fibers. I just tried my deployment method as mentioned above – and it still works, including compiling fibers (@1.0.5). Granted, this is for Meteor 1.2 type packages, etc. Things very well may have changed to 1.3, but I’m not in the position to upgrade to 1.3 and see what breaks. :slight_smile:

oh, that is very valuable input. thank you so much.

hope i can make something out of it …

finally got it done. notes:

  • need meteor 1.3.2.4, use --release 1.3.2.4 in all important commands to ensure that
  • need visual c++ tool chain 2013 (2015 does not work, not only because of dir structure, also because of the files)
  • after a meteor build, npm install will still fail. at least in the case when dev environment = prod run environment, this should be a remedy:

in package.json delete the lines

“scripts”: {
“install”: “node npm-rebuild.js”
}

this avoids the rebuild that will just destroy all you have built before.

hey @snup

having exact same error. Which node version were you using globally (I am trying to demeteorize), and which node version did you have in meteor?

lmk if you might be willing to consult via chat or something for a few min…this is basically blocking development, so super important & would be super helpful.

hi @arshs01

bsaically the above is a writeup of what i did. so the meteor version was 1.3.2.4. the node version is v.0.10.x, I had v0.10.41 but I think any v0.10.x will behave equally.