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.
Related
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.
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
Been trying to install Grunt on my laptop to try it out, I already had Node, so installed the Grunt cli which went ok and then ran the command npm init to create the package.json file, followed the necessary steps and also went well, however when I get to the point of installing dependencies, I get an error.
For instance am trying to install Grunt as a dependency, with the following command:
npm install grunt --save-dev
After running this command I get the following error:
No README.md file found
If anyone knows what I am meant to do please let me know.
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