I'm getting this error message:
npm list -g --depth=0
/Users/TDK/.nvm/versions/node/v6.11.2/lib
├── UNMET PEER DEPENDENCY firebase-admin#6.1.0
npm ERR! peer dep missing: firebase-admin#~6.0.0, required by firebase-functions#2.1.0
I ran
npm -g uninstall firebase-admin --save
Then I ran
npm -g install firebase-admin --save
Should I run this again without --save, or uninstall and reinstall an older version? 6.1.0 is the latest version, released two weeks ago.
Reverting back to firebase-admin 6.0.0 worked.
npm -g uninstall firebase-admin --save
npm -g install firebase-admin#6.0.0 --save
npm list --depth=0
functions# /Users/TDK/LanguageTwo/functions
├── #google-cloud/storage#2.3.0
├── firebase-admin#6.0.0
├── firebase-functions#2.1.0
Related
What does these lines mean
meteor npm install --production
meteor npm install --save
?
The Docs explains the command meteor npm <pacakge name> So the npm package is install, but what does the flag --production and --save do?
The meteor npm command simply forwards the arguments that follow it to Meteor's bundled npm version, so it behaves as the npm command-line tool.
The basic command is meteor npm <command and arguments.
This basic install command is meteor npm install <package name> rather than meteor npm <package name>.
Its relevant documentation is therefore not the one you referenced in your question, but the npm's CLI tool's (you referenced npm's install package, note the npm install install there).
NPM creates a package.json file and lists the project's dependencies there. You use the --save flag to instruct npm to add the packages installed to the dependencies file and the --production flag to instruct npm to not install its dev-dependencies, which are dependencies that were used for developing and debugging this package, but are not strictly required for its operation in production.
Take the time to familiarize yourself with the tool.
From the CLI docs:
npm install (with no args, in package dir)
npm install [<#scope>/]<name>
npm install [<#scope>/]<name>#<tag>
npm install [<#scope>/]<name>#<version>
npm install [<#scope>/]<name>#<version range>
npm install <tarball file>
npm install <tarball url>
npm install <folder>
alias: npm i
common options: [-S|--save|-D|--save-dev|-O|--save-optional] [-E|--save-exact] [--dry-run]
-S, --save: Package will appear in your dependencies.
With the --production flag (or when the NODE_ENV environment variable is set to production), npm will not install modules listed in devDependencies.
I have been trying to install arduino nodes in Node-Red through node-red-node-arduino following Node-Red's own guide (https://nodered.org/docs/hardware/arduino) to no avail. The node is marked as installed in the "Manage Palletes" tab, but it's disabled and refuses to enable itself. I tried to insert the sample code of the link above, but Node-Red doesn't recognize it. I installed the package arduino-firmata and node-red-node-serialport, and all the packages both locally (~/.node-red/node_modules) and globally (through -g option in npm), but the situation remains the same.
cd ~/.node-red
npm install node-red-node-arduino
npm install arduino-firmata
npm install node-red-node-serialport
sudo npm -g install node-red-node-arduino
sudo npm -g install arduino-firmata
sudo npm -g install node-red-node-serialport
They do spit out some weird logs, though, at least when installing locally.
> serialport#4.0.3 install /home/myusername/.node-red/node_modules/serialport
> node-pre-gyp install --fallback-to-build
[serialport] Success: "/home/myusername/.node-red/node_modules/serialport/build/Release/serialport.node" is installed via remote
/home/myusername/.node-red
├── arduino-firmata#0.3.4
├── node-red-node-arduino#0.0.9
├── node-red-node-serialport#0.4.0
└── serialport#4.0.3
npm WARN enoent ENOENT: no such file or directory, open '/home/myusername/.node-red/package.json'
npm WARN .node-red No description
npm WARN .node-red No repository field.
npm WARN .node-red No README data
npm WARN .node-red No license field.
npm WARN In serialport#4.0.3 replacing bundled version of minimist with minimist#0.0.8
npm WARN In serialport#4.0.3 replacing bundled version of abbrev with abbrev#1.0.9
npm WARN In serialport#4.0.3 replacing bundled version of delegates with delegates#1.0.0
...
Here is the log that shows up when running node-red in the terminal.
[warn] [arduino] Error: Cannot find module 'firmata/node_modules/serialport'
I installed grunt-cli both locally and globally and I can see the same in both local and global paths.
To test if the installation works, when I tried to run
grunt -h
it shows following
>> Local Npm module "grunt-cli" not found. Is it installed?
Grunt: The JavaScript Task Runner (v0.4.5)
Usage
grunt [options] [task [task ...]]
Options
--help, -h Display this help text.
--base Specify .......
When I run grunt -v, following is part of its output
Registering "grunt-cli" local Npm module tasks.
Reading /Users/cominventor/myproject/node_modules/grunt-cli/package.json...OK
Parsing /Users/cominventor/myproject/node_modules/grunt-cli/package.json...OK
>> Local Npm module "grunt-cli" not found. Is it installed?
To install locally, I ran the following command (suggested by #Aruna)
npm install grunt --save-dev
npm install grunt-cli --save-dev
and got the following output for the second command
npm ERR! Darwin 16.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "grunt-cli" "--save-dev"
npm ERR! node v6.6.0
npm ERR! npm v3.10.7
npm ERR! code ENOSELF
npm ERR! Refusing to install grunt-cli as a dependency of itself
npm ERR!
Any clues what am I missing here?
How did you install the grunt?
Have you tried both global and local modules as below,
Global
npm install -g grunt-cli
Local
npm install grunt --save-dev
npm install grunt-cli --save-dev
I have a Meteor + React app that works fine locally. I've tested using the --production flag and there are no issues.
Once I use mupx to deploy to my server, the deployment is successful but when I go to the deployed app it throws "There is no route for the path: /".
My routes.js file is located in the client directory.
Here is my mupx logs -f result
npm WARN deprecated This version of npm lacks support for important
features, npm WARN deprecated such as scoped packages, offered by the
primary npm npm WARN deprecated registry. Consider upgrading to at
least npm#2, if not the npm WARN deprecated latest stable version. To
upgrade to npm#2, run: npm WARN deprecated npm WARN deprecated npm -g
install npm#latest-2 npm WARN deprecated npm WARN deprecated To
upgrade to the latest stable version, run: npm WARN deprecated npm
WARN deprecated npm -g install npm#latest npm WARN deprecated npm
WARN deprecated (Depending on how Node.js was installed on your
system, you npm WARN deprecated may need to prefix the preceding
commands with sudo, or if npm WARN deprecated on Windows, run them
from an Administrator prompt.) npm WARN deprecated npm WARN
deprecated If you're running the version of npm bundled with npm WARN
deprecated Node.js 0.10 LTS, be aware that the next version of 0.10
LTS npm WARN deprecated will be bundled with a version of npm#2, which
has some small npm WARN deprecated backwards-incompatible changes made
to npm run-script and npm WARN deprecated semver behavior. npm WARN
package.json meteor-dev-bundle#0.0.0 No description npm WARN
package.json meteor-dev-bundle#0.0.0 No repository field. npm WARN
package.json meteor-dev-bundle#0.0.0 No README data
fibers#1.0.8 install
/bundle/bundle/programs/server/node_modules/fibers node build.js ||
nodejs build.js make: Entering directory
/bundle/bundle/programs/server/node_modules/fibers/build' CXX(target)
Release/obj.target/fibers/src/fibers.o CXX(target)
Release/obj.target/fibers/src/coroutine.o CC(target)
Release/obj.target/fibers/src/libcoro/coro.o SOLINK_MODULE(target)
Release/obj.target/fibers.node SOLINK_MODULE(target)
Release/obj.target/fibers.node: Finished COPY Release/fibers.node
make: Leaving
directory/bundle/bundle/programs/server/node_modules/fibers/build'
Installed in
/bundle/bundle/programs/server/node_modules/fibers/bin/linux-x64-v8-3.14/fibers.node
npm WARN cannot run in wd meteor-dev-bundle#0.0.0 node npm-rebuild.js
(wd=/bundle/bundle/programs/server) ansi-regex#0.2.1
node_modules/ansi-regex
ansi-styles#1.1.0 node_modules/ansi-styles
escape-string-regexp#1.0.5 node_modules/escape-string-regexp
chalk#0.5.1 node_modules/chalk
has-ansi#0.1.0 node_modules/has-ansi
strip-ansi#0.3.0 node_modules/strip-ansi
supports-color#0.2.0 node_modules/supports-color
eachline#2.3.3 node_modules/eachline
type-of#2.0.1 node_modules/type-of
amdefine#1.0.0 node_modules/amdefine
asap#2.0.3 node_modules/asap
underscore#1.5.2 node_modules/underscore
meteor-promise#0.5.1 node_modules/meteor-promise
promise#7.0.4 node_modules/promise
source-map-support#0.3.2 node_modules/source-map-support
semver#4.1.0 node_modules/semver
source-map#0.1.32 node_modules/source-map
fibers#1.0.8 node_modules/fibers
=> Starting meteor app on port:80
I created a bundle and try install as wrote in readme
> node ./build.js
module.js:340
throw err;
^
Error: Cannot find module '/root/bundle/programs/server/node_modules/fibers/build.js'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
npm ERR! fibers#1.0.1 install: `node ./build.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the fibers#1.0.1 install script.
npm ERR! This is most likely a problem with the fibers package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./build.js
npm install -g fiders works as well
I'm not sure if this is the same problem, but starting with 0.9.0 you have to install fibers after unpacking the build. From the readme:
To prepare a bundle created with meteor bundle for execution on a server, you now run npm install with no arguments instead of having to specify a few specific npm modules and their versions explicitly. See the README in the generated bundle for more details.
I do something like this in my deployment script:
meteor bundle /path/to/target/bundle.tgz
cd /path/to/target/
rm -rf bundle
tar xzf bundle.tgz
cd bundle/programs/server && npm install