Can't start Meteor

Hi,

I wanted to give Meteor a try, but cannot even start it… Fresh install, and here what I get

meteor
module.js:327
throw err;
^
Error: Cannot find module 'C:\Users\al_\node_modules\sqlite3\lib\binding\node-v46-win32-ia32\node_sqlite3.node’
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module.load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (C:\Users\al
\node_modules\sqlite3\lib\sqlite3.js:4:15)
at Module._compile (module.js:409:26)
at Object.Module._extensions…js (module.js:416:10)
at Module.load (module.js:343:32)
at Module.Mp.load (C:\tools\tool-env\install-runtime.js:30:27)
at Function.Module._load (module.js:300:12)

I’m running Windows 10 Home and have a latest node installed.

Any thoughts?

Thanks a lot,

Alex

Try removing your node. Meteor comes with bundled versions of node and npm which will be at the correct versions.

Thanks. That’s what I was thinking…but moving all my stuff from node 8 to node 4.6 is not an option for me. So, there is no way to keep the latest node and Meteor on the same computer?

Thanks,

Alex

It looks to me like the problem is that it’s finding packages in node_modules of your users home directory. If you temporarily move that sideways out of the way, does meteor start?

Node 8 support in Meteor is in progress and should be released as meteor 1.6, see https://github.com/meteor/meteor/pull/8728

Thanks for your help. Yes, it starts if I rename mode_modules folder. But, in this case I have to chose between keeping all my products running and playing with Meteor :slight_smile:
Even if I start development on another (clean) computer, it seems that I cannot provide the outcome to the customers that have nodejs running on their systems. “Not nice”…

Alex

The way it is meant to work is that meteor installs its own version of node, and this should not clash with what you have already installed. The meteor dev bundle includes the packages that should be needed, in a node_modules directory.

For me this is:
<users home directory>/.meteor/packages/meteor-tool/.1.5.0.q9pe82.mj0xhzd7vi++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules

When Meteor’s node executes it should find the packages it needs there first, but if it doesn’t, the standard node search path is used, which involves a search up to the root node_modules and your home directory node_modules. As the meteor tool runs from inside your home directory it may always end up looking at ~/node_modules.

So the big question is why didn’t it find the version of sqlite3 in the meteor-tool folder?

My guess is that you have some node environment variables set that are overriding things. Possibly having a different version of node in your PATH might also do it.
Check for NODE_PATH especially.

Ultimately, I think if you remove the environment variable when running meteor it should be OK. This means that they can co-exist on the same machine so long as you use a different console with the environment tweaked.

Well, this is weird…
First of all, of course the node path exists in the environment as node installation adds it there.

I just copied the sqlite3 folder from meteor to my Users/…/node_modules (there was an older version there, BTW) and it seems to work now.
Well, maybe something else does not work, but at least I was able to build their tutorial…

Thanks a lot for your help. I was very frustrated (you know that’s the day nothing you do works…) so I uninstalled the Meteor and decided to move somewhere else. Thanks to you, I gave it another try. Let’s see what’s gonna happen…

Thanks,

Alex

P.S.
As I understand, it also brings its own MongoDB. I have (probably) another version installed as well :slight_smile:

Yes there is a version of mongo installed with meteor but I believe that gets invoked directly rather than being looked up on the PATH so I doubt you’ll hit issues there.

node is a bit funny especially with the searching for node_modules directories. Don’t forget that if you hit issues, I still suggest trying to remove node settings etc from you environment when running meteor. PATH is one case, but try using set NODE to see if there are any other environment variables set. (‘set’ on its own will list all environment variables)

Hi there,

Just to update you. I was able to complete the react tutorial (until the test section, which didn’t work for me) and even deploy it to the local server.
I tried their next tutorial (meteor create --example todos) with no luck (on 2 Win10 computers, including absolutely clean one -no node, nothing). It just doesn’t work (at least on Windows).

Thanks once again,

Alex