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
Related
I'm currently trying to configure my portfolio on a VPS using nginx and Putty.
Now I want to install all required modules for my backend, but I get this errors.
I have no idea what to do and would love to get some help.
npm ERR! Linux 4.15.0
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! path /root/portfolio/server/node_modules/.staging/#types/webidl-conversions-b037bbf1/package.json
npm ERR! code ENOTDIR
npm ERR! errno -20
npm ERR! syscall open
npm ERR! ENOTDIR: not a directory, open '/root/portfolio/server/node_modules/.staging/#types/webidl-conversions-b037bbf1/package.json'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /root/portfolio/server/npm-debug.log
To install all the modules, I went to my backend folder and typed 'npm install' in my Putty console.
Then it starts to download the modules and everything seems fine, until the errors pop up after a few seconds.
I also tried 'apt-get update' and 'apt-get upgrade', but it changes nothing.
I found the solution to my problem.
I had to update my node and npm, but not like usually with 'apt update', 'apt upgrade', 'apt install nodejs' or 'apt install npm'.
Instead I tried this:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
nvm install 14.4.0
... and then it worked.
Hope this will help someone
I'm trying to do npm install for firebase but I keep running into errors...
I tried with npm version 5.6.0 and 5.7.1
I even tried installing assert-plus but that also failed (similar error to below). Any suggestions?
vagrant [polaris]> npm install firebase
npm ERR! path /vagrant/polaris/node_modules/grpc/node_modules/dashdash/node_modules/assert-plus/package.json.2882240414
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/vagrant/polaris/node_modules/grpc/node_modules/dashdash/node_modules/assert-plus/package.json.2882240414'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2018-03-14T23_28_13_938Z-debug.log
You should use npm install -g firebase-tools instead of npm install -g firebase. After that, you'll be able to initialize your project on your PC.
One quick suggestion. Delete your node_modules folder and do a fresh 'npm install'.
I tried installing the meteor executable file on my local machine. meteor --version turned up nothing on the command line. I then tried npm install meteor on powershell and got this:
Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.
PS C:\WINDOWS\system32> npm install -g meteor
npm WARN deprecated mongodb#1.1.11: Please upgrade to 2.2.19 or higher
npm WARN deprecated node-uuid#1.3.3: Use uuid module instead
C:\Users\Owner\AppData\Roaming\npm\meteor -> C:\Users\Owner\AppData\Roaming\npm\node_modules\meteor\app\meteor\meteor.js
> bson#0.1.5 install C:\Users\Owner\AppData\Roaming\npm\node_modules\meteor\node_modules\bson
> node install.js || (exit 0)
================================================================================
= =
= Attempting to build bson c++ extension =
= Windows: no build will be attempted as binaries are prepackaged =
= Unix: on failure the package will still install without the C++ extension =
= =
================================================================================
> fibers#0.6.9 install C:\Users\Owner\AppData\Roaming\npm\node_modules\meteor\node_modules\fibers
> node ./build.js
(node:9716) DeprecationWarning: child_process: options.customFds option is deprecated. Use options.stdio instead.
events.js:160
throw er; // Unhandled 'error' event
^
Error: spawn node-gyp ENOENT
at exports._errnoException (util.js:1018:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:393:7)
at startup (bootstrap_node.js:150:9)
at bootstrap_node.js:508:3
C:\Users\Owner\AppData\Roaming\npm
`-- (empty)
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "ins
tall" "-g" "meteor"
npm ERR! node v6.10.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! fibers#0.6.9 install: `node ./build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fibers#0.6.9 install script 'node ./build.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, 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 ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs fibers
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls fibers
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\WINDOWS\system32\npm-debug.log
npm ERR! code 1
The same command on Git Bash turned the same result. How can this be resolved? I should note that I tried "run as administrator" for powershell and git bash.
On windows, install meteor using the meteor installer:
https://www.meteor.com/install
I'm attempting a routine-test of a customized WordPress-installation on a localhost production supported by the node package-manager. After instantiating the WordPress core-files, ensuring successful connection to the database and updating a few assets, I attempted to change-directory into the corresponding WordPress-theme files to run the node-package-manager install command with npm install (which was successful) and then attempted to execute the CSS-compiler with npm run buildas per routine; however, on this attempt, I encountered the following errors within my below terminal output:
vetsi npm run build
> # build /Users/alexsingleton/Sites/vetsi/wp-content/themes/vetsi
> npm-run-all --silent compile:css compile:js
/Users/alexsingleton/Sites/vetsi/wp-content/themes/vetsi/node_modules/stylus/bin/stylus:715
if (err) throw err;
^
Error: ENOENT: no such file or directory, open 'build/bundle.css'
at Error (native)
ERROR: compile:css: None-Zero Exit(1);
npm ERR! Darwin 16.4.0
npm ERR! argv "/Users/alexsingleton/.nvm/versions/node/v4.4.4/bin/node" "/Users/alexsingleton/.nvm/versions/node/v4.4.4/bin/npm" "run" "build"
npm ERR! node v4.4.4
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # build: `npm-run-all --silent compile:css compile:js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # build script 'npm-run-all --silent compile:css compile:js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm-run-all --silent compile:css compile:js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/alexsingleton/.npm/_logs/2017-02-15T17_48_20_907Z-debug.log
➜ vetsi
I've tried updating both the node package manager with npm install -g npm and verified the correct version corresponding to another successful localhost production with nvm ls generating the below output:
vetsi nvm ls
v0.12.7
-> v4.4.4
system
default -> 4.4.4 (-> v4.4.4)
node -> stable (-> v4.4.4) (default)
stable -> 4.4 (-> v4.4.4) (default)
iojs -> iojs- (-> N/A) (default)
➜ vetsi
Needless to say, the above-errors preclude any localhost pages from rendering, though I can successfully access and navigate within the WordPress Content Management system. I would appreciate any guidance- thank you!
After investigating the localhost-production within the console of Google Chrome Inspector Tools, the error reported that the entire node package-manager folder and dependencies were missing. Since neither npm-install nor npm build didn't instantiate the package-folder or dependencies, I simply copied the files from my other working localhost production, specifically bundle.css where it was apparently missing from the appropriate path (wp/themes/vetsi/build). For now, this hack is the best solution to my problem but I welcome alternative analysis or clarification as to why the aforementioned commands didn't correctly execute according to my previous successes. Thanks!
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