spectral-cli instalation in ubuntu getting failed - node.js

npm install -g #stoplight/spectral-cli
Giving below error
npm WARN node-fetch#2.6.8 requires a peer of encoding#^0.1.0 but none was installed.
npm ERR! Linux 5.4.0-1094-azure
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "#stoplight/spectral-cli"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! path /usr/local/lib/node_modules/.staging/#types/node-76508090/package.json
npm ERR! code ENOTDIR
npm ERR! errno -20
npm ERR! syscall open
npm ERR! ENOTDIR: not a directory, open '/usr/local/lib/node_modules/.staging/#types/node-76508090/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! /azp/npm-debug.log
npm ERR! code 1

Related

What is this error and why cant i start npm?

I iried to start npm using npm start, bu all i see is
npm ERR! Linux 4.4.0-59-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v5.10.1
npm ERR! npm v4.0.5
npm ERR! missing script: start
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! /home/npm-debug.log

Issues with ghost installation and npm

I got this error when trying to install the ghost blogging software.
npm ERR! install Couldn't read dependencies
npm ERR! Darwin 15.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "--production"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! path /Users/abe/package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno -2
npm ERR! package.json ENOENT, open '/Users/abe/package.json'
npm ERR! package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm can't find a package.json file in your current directory.
npm ERR! Please include the following file with any support request:

Getting Error while creating project folder using command yo cg-angular

While creating project folder using the command yo cg-angular gets error showing below,
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files
x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! code ELIFECYCLE
npm ERR! phantomjs#1.9.16 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs#1.9.16 install script 'node install.js'.
npm ERR! This is most likely a problem with the phantomjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls phantomjs
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\MyNewAwesomeApp\npm-debug.log

Error installing gulp using nodejs on windows

I am getting the following error while installing gulp using nodejs on my windows OS. The following is the error I get when I type:
npm install -g gulp
This is the output I get:
npm ERR! v8flags#1.0.1 install: `node fetch.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the v8flags#1.0.1 install script.
npm ERR! This is most likely a problem with the v8flags package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node fetch.js
npm ERR! You can get their info via:
npm ERR! npm owner ls v8flags
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "E:\\Program Files\\nodejs\\\\node.exe" "E:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "gulp"
npm ERR! cwd C:\Users\pramod\Desktop
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! syscall spawn
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! not ok code 0

npm errow while try using yeoman generator

hello i try to run npm install -g yo but i have got error :
npm install -g yo
npm http GET https://registry.npmjs.org/yo
npm http 304 https://registry.npmjs.org/yo
npm ERR! Error: No compatible version found: yo
npm ERR! No valid targets found.
npm ERR! Perhaps not compatible with your version of node?
npm ERR! at installTargetsError (/usr/local/lib/node_modules/npm/lib/cache.js:486:10)
npm ERR! at next_ (/usr/local/lib/node_modules/npm/lib/cache.js:436:17)
npm ERR! at next (/usr/local/lib/node_modules/npm/lib/cache.js:413:44)
npm ERR! at /usr/local/lib/node_modules/npm/lib/cache.js:406:5
npm ERR! at saved (/usr/local/lib/node_modules/npm/lib/utils/npm-registry-client/get.js:151:7)
npm ERR! at Object.oncomplete (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:230:7)
npm ERR! You may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR!
npm ERR! System Linux 3.13.0-36-generic
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "yo"
npm ERR! cwd /home
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.21
npm ERR! message No compatible version found: yo
npm ERR! message No valid targets found.
npm ERR! message Perhaps not compatible with your version of node?
npm ERR! Error: EACCES, open 'npm-debug.log'
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR!
npm ERR! System Linux 3.13.0-36-generic
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "yo"
npm ERR! cwd /home
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.21
npm ERR! path npm-debug.log
npm ERR! code EACCES
npm ERR! message EACCES, open 'npm-debug.log'
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/npm-debug.log
I havent got any idea what is wrong my npm version is 1.1.21 my node version is v0.6.18
Can you give me some advice what is wrong with that configuration ?
You need to upgrade your version of Node.js and npm.
From the Yeoman website:
Install prerequisites
Before installing Yeoman, you will need the following:
Node.js v0.10.x+
npm (which comes bundled with Node) v1.4.3+
git

Resources