Asaf
Asaf

Reputation: 8206

Meteor project giving npm module error whenever switching OS

I have a Windows Laptop, and a Linux desktop.
Whenever I switch from my Laptop to my desktop (my Meteor project is on Dropbox, so it syncs), I can't get my Meteor project to run, getting the following error:

Error: Can't find npm module 'double-ended-queue'. Did you forget to call 'Npm.depends' in package.js within the 'meteor' package?

The odd thing is, I've tried removing .meteor/local , and since my project is a git repo, I could easily check and see that git diff is not giving anything, so I'm not sure what changed.

Any ideas about how I could solve this issue?

Upvotes: 1

Views: 171

Answers (2)

Michael Mason
Michael Mason

Reputation: 932

Dropbox isn't really a suitable place to store code. Meteor uses a .gitignore file to avoid the problem you're having, which implies that they expect you to be using git repositories. Depending on your needs you could try GitHub (https://github.com) or BitBucket (https://bitbucket.org). BitBucket has the benefit of allowing private repositories free of charge.

If you really want to use Dropbox you should be able to ignore the .meteor/local folder with selective-sync. More info at https://www.dropbox.com/en/help/175

In terms of the reason for the synced code not working when you switch OS, it is because meteor compiles packages into the .meteor/local directory. Some but not all of this code is OS-specific (basically any binary packages will fail if you switch OS because they are compiled for your specific OS and processor architecture).

Upvotes: 0

pahan
pahan

Reputation: 2453

This happens because meteor builds your project according to your OS it is recommended you ignore .meteor/local directory from syncing. That is why it is added to your .gitignore file by meteor automatically, hence no result on git diff.

Upvotes: 0

Related Questions