When attempting to npm install or install with Yarn, it unsuccessfully looks for package.json in the directory above.
npm ERR! addLocal Could not install /Users/user/Developer
npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/Cellar/node6-lts/6.9.1/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v6.9.1
npm ERR! npm v3.10.9
npm ERR! code EISDIR
npm ERR! errno -21
npm ERR! syscall read
npm ERR! eisdir EISDIR: illegal operation on a directory, read
npm ERR! eisdir This is most likely not a problem with npm itself
npm ERR! eisdir and is related to npm not being able to find a package.json in
npm ERR! eisdir a package you are trying to install.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/user/Developer/npm-debug.log
Any thoughts on why this is happening?
Related
I have installed node on E dir and I am installing expo for react-native
E:>npm i -g expo-cli
npm ERR! code ETARGET
npm ERR! notarget No matching version found for semver#^7.3.5.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\jca\AppData\Local\npm-cache_logs\2021-05-03T05_32_28_520Z-debug.log
after this, when I am installing semver,
E:>npm install semver
npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path E:
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir 'E:'
npm ERR! [Error: EPERM: operation not permitted, mkdir 'E:'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: 'E:\'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
I'm trying to get travis-ci going on my angular2 project, which uses npm to install typings, but travis-ci fails on typings install.
error
npm ERR! Linux 3.13.0-40-generic
npm ERR! argv "/home/travis/build/borysn/spring-boot-angular2/src/main/web/node/node-v6.2.0-linux-x64/bin/node" "/home/travis/build/borysn/spring-boot-angular2/src/main/web/node_modules/npm/bin/npm-cli.js" "install"
npm ERR! node v6.2.0
npm ERR! npm v3.9.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! spring-boot-angular2#0.0.1-SNAPSHOT postinstall: `typings install`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the spring-boot-angular2#0.0.1-SNAPSHOT postinstall script 'typings install'.
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 spring-boot-angular2 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! typings install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs spring-boot-angular2
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls spring-boot-angular2
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/travis/build/borysn/spring-boot-angular2/src/main/web/npm-debug.log
:npmInstall FAILED
There were changes in typings 1.0 that I missed, make sure to read through updating from 0.x to 1.0
I tried to install and use npm in two ways, but I get only errors.
Installing npm by normal way:
vagrant#precise64:~$ npm install
npm ERR! Couldn't read dependencies.
npm ERR! Error: ENOENT, no such file or directory '/home/vagrant/package.json'
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/vagrant/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.2.0-23-generic
npm ERR! command "node" "/usr/bin/npm" "install"
npm ERR! cwd /home/vagrant
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! path /home/vagrant/package.json
npm ERR! code ENOENT
npm ERR! message ENOENT, no such file or directory '/home/vagrant/package.json'
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/vagrant/npm-debug.log
npm not ok
Trying to install latest version:
vagrant#precise64:~$ npm install -g npm#latest
npm http GET https://registry.npmjs.org/npm
npm ERR! Error: failed to fetch from registry: npm
npm ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR! at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18)
npm ERR! at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR! at Request.<anonymous> (/usr/lib/nodejs/request/main.js:212:58)
npm ERR! at Request.emit (events.js:88:20)
npm ERR! at ClientRequest.<anonymous> (/usr/lib/nodejs/request/main.js:412:12)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1261:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/vagrant/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.2.0-23-generic
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "npm#latest"
npm ERR! cwd /home/vagrant
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: npm
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/vagrant/npm-debug.log
npm not ok
What should I install before to create this package.json file ane make it work?
npm looks like it's already installed. Go to your project root and:
npm init
It'll walk you through making a package.json file, then you can
npm i whateverpackageyouwant
to your heart's content.
I am trying to install the gulp into my project folder.But when I run this command to install the gulp I get following error:
Sab-MacBook-Pro:myproject sab$ npm install gulp -save-dev
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "gulp" "-save-dev"
npm ERR! node v5.3.0
npm ERR! npm v3.3.12
npm ERR! path /Users/sab/RubymineProjects/myproject/node_modules/gulp
npm ERR! code ENOTEMPTY
npm ERR! errno -66
npm ERR! syscall rename
npm ERR! ENOTEMPTY: directory not empty, rename '/Users/sab/RubymineProjects/myproject/node_modules/gulp' -> '/Users/sab/RubymineProjects/myproject/node_modules/.gulp.DELETE'
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! /Users/sab/RubymineProjects/myproject/npm-debug.log
Sab-MacBook-Pro:myproject sab$
If I am not wrong the error message is due to existing gulp folder.But when I look into the my project node_module folder the gulp folder is not there.
I can't seem to install bower properly. I don't know what's wrong, but it keeps throwing these errors. Can someone help?
npm ERR! tar.unpack untar error /Users/Jeanwoo/.npm/bower/1.4.1/package.tgz
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! node v0.12.5
npm ERR! npm v2.11.2
npm ERR! path /usr/local/lib/node_modules/bower
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/bower'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES, mkdir '/usr/local/lib/node_modules/bower']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/bower',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/local/lib/node_modules/bower',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:35:25',
npm ERR! '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:47:53',
npm ERR! 'FSReqWrap.oncomplete (fs.js:95:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Jeanwoo/npm-debug.log
I'm assuming the command you're running is npm install -g bower (to install Bower globally on your machine).
The error
Please try running this command again as root/Administrator
...makes me think you should try running as root:
sudo npm install -g bower
And then input your password and it should install. If not, what is the command you're running?