I just cloned my meteor github repo to a new machine and now I have to npm install some packages again. I thought that they are part of the meteor app once I have them installed. (and I checked. they are in the node_modules folder and listed in the packages.json). Nonetheless, I get the error:
Can't find npm module 'react'. Did you forget to call 'Npm.depends' in package.js witin the 'modules-runtime'package?
I am running meteor 1.3.1
Related
What commands must I follow on the command line to downgrade. I ran uninstall and reinstalled as well as nom i -S firebase#... but now when I reload the app it just crashes.
If you have to install an older version of a package, just specify it
npm install <package>#<version>
For example: npm install firebase#9.2.0
You can also add the --save flag to that command to add it to your package.json dependencies, or --save --save-exact flags if you want that exact version specified in your package.json dependencies.
The install command is documented here: https://docs.npmjs.com/cli/install
If you're not sure what versions of a package are available, you can use:
npm view firebase versions
And npm view can be used for viewing other things about a package too.
https://docs.npmjs.com/cli/view
don't forget to remove .lock file first to rebuilt the depedency
can u give the error messege for us....
I'm having a weird issue where, upon starting a clean build of an app which was working previously, and running meteor npm install then meteor, I get a bunch of errors:
I suspect that for some reason, meteor npm install isn't running properly. I've reinstalled meteor, run meteor reset, and nothing seems to work.
Since Meteor 0.9.0 it's posible to install dependencies from atmospherejs just using the meteor cli without install meteorite package manager.
However, is it posible to install all the dependencies declared in smart.json file without install meteorite (i.e. just using meteor cli)?
Thanks in advance.
smart.json is no longer used since Meteor 0.9. The dependencies of an app are stored in .meteor/packages, and are automatically installed when you run meteor run, and when the app restarts automatically after its files are changed. That is, the meteor tool will update the package catalog and install updated packages automatically.
I need to install npm dependencies described on my packages.json file manually (by manually I mean with a command like npm install or mrt install, that doesn't require to start the app).
I know that meteor-npm creates the npm directory inside packages and that when I start the app using mrt or meteor the npm modules get downloaded.
But I'm writing a test script and I need the modules to be installed before running the tests so I would need to install them as I install standard meteorite modules with mrt install.
In theory this is very easy, because you could just run npm install PACKAGENAME in your project directory. However, this would of course mess up meteor, which will try to interpret the new files as meteor files.
Instead, you have two options:
install in a super directory (they will be found): cd .. && npm install PACKAGENAME
install packages globally: npm install -g PACKAGENAME
I just checked out my meteor project from github and tried to run it, but now meteor doesn't want to start, telling me that npm is missing
I start my project as follows:
$> MONGO_URL='mongodb://localhost:27017/meteor' mrt
...
=> Started proxy.
=> Errors prevented startup:
While building the application:
error: no such package: 'npm'
=> Your application has errors. Waiting for file change.
In my project I use npm like
var fs = Npm.require('fs');
What I don't understand is why it doesn't work. I tried to install npm
$> mrt add npm
but that didn't fixed it. Any suggestions what the problem might be ?
When you run the app with meteor command it only uses the packages installed locally in the /packages folder and built-in Meteor packages. To also install the atmosphere packages, you should run the app with mrt command. Alternatively, you could run mrt install, which downloads the atmosphere packages to the /packages directory, and thus allows you to start the app with meteor.