I added this dependency to my package.json :
"user": "file:./server/models/user"
Inside my user file I've got module.exports = function() {...}
npm ERR! addLocal Could not install /home/WebstormProjects/project/server/models/user
npm ERR! Linux 3.19.0-30-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.1.1
npm ERR! npm v2.14.4
npm ERR! path /home/WebstormProjects/project/server/models/user
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/home/WebstormProjects/project/server/models/user'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /home/WebstormProjects/project/npm-debug.log
I did follow the doc : https://docs.npmjs.com/files/package.json#local-paths
The error messages aren't very helpful, but it has to be (emphasis mine):
a path to a local directory that contains a package
https://docs.npmjs.com/files/package.json#local-paths
You appear to be pointing it to a file. You probably need something like:
"user": "file:./server/models"
A package also requires a package.json, so in that case you'd need to have server/models/package.json.
Related
I got this problem after install nodejs and npm in my Ubuntu 18.04 and I tried to start it with npm start I get this error :
npm ERR! Linux 4.15.0-38-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! path /home/crispy/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/home/crispy/package.json'
npm ERR! enoent ENOENT: no such file or directory, open '/home/crispy/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /home/crispy/npm-debug.log
I am a newbie please help me to solve this problem
The documentation for the module tells me to run npm install --save mapbox-gl but when I try this I receive the following error.
npm ERR! addLocal Could not install
/Users/marchorne/conichi/cmc/node_modules/mapbox-gl/src/style-spec
npm WARN deprecated point-geometry#0.0.0: This module has moved: please
install #mapbox/point-geometry instead
npm WARN deprecated vector-tile#1.3.0: This module has moved: please
install #mapbox/vector-tile instead
npm ERR! Darwin 16.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--save" "mapbox-gl"
npm ERR! node v6.10.0
npm ERR! npm v3.10.10
npm ERR! path /Users/marchorne/conichi/cmc/node_modules/mapbox-gl/src/style-spec
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open
'/Users/marchorne/conichi/cmc/node_modules/mapbox-gl/src/style-spec'
npm ERR! enoent ENOENT: no such file or directory, open
'/Users/marchorne/conichi/cmc/node_modules/mapbox-gl/src/style-spec'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /Users/marchorne/conichi/cmc/npm-debug.log
My system is MacOS Sierra 10.12.5
Node version: v6.10.0
NPM version: v3.10.10
v0.39 seems to be broken see https://github.com/mapbox/mapbox-gl-js/issues/5025
You can try to install previous version with npm install --save mapbox-gl#0.38.0
I want to install gulp globally,so I use this command ,
npm install gulp -g
then throw this error:
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "E:\\nodejs\\node.exe" "E:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "gulp"
npm ERR! node v6.5.0
npm ERR! npm v3.10.3
npm ERR! path E:\nodejs\node_global\gulp
npm ERR! code EISDIR
npm ERR! errno -4068
npm ERR! syscall open
npm ERR! eisdir EISDIR: illegal operation on a directory, open 'E:\nodejs\node_global\gulp'
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! H:\npm-debug.log
It seems that the error occurs because when it wants to open an director ,in fact it was an file.I checked for the node_global director and found an file named gulp.cmd and a file named gulp too.So there may be conflict between them.
It is an simple problem.I set the config of npm with this
cache=E:\nodejs\node_global
prefix=E:\nodejs\node_global
The cache and prefix should not be placed in same director.May be I just change it by accident.Happy coding:)
I have been having an issue on Windows 7. I have been using the following npm command to install a package from a git-labs repository.
npm install --save git+ssh://git#156.67.38.79:mma/node-typescript-bundle.git
The error I get is as follows.
It fails with the following.
$ npm install --save git+ssh://git#156.67.38.79:mma/node-typescript- bundle.git
npm ERR! addLocal Could not install C:\Users\Operator\AppData\Local\Temp\npm-7556-2bcb63a8\git-cache-ff531437\b3f389becc07c9c83e86c17919f3e869f098f123
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save" "git+ssh://git#156.67.38.79:mma/node-typescript-bundle.git"
npm ERR! node v6.4.0
npm ERR! npm v3.10.3
npm ERR! path C:\Users\Operator\Dev\npm-ccache\node-typescript -bundle\1.0.0\package.tgz
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall scandir
npm ERR! enoent ENOENT: no such file or directory, scandir 'C:\Users\Operator\Dev\npm-ccache\node-typescript-bundle\1.0.0\package.tgz'
npm ERR! enoent ENOENT: no such file or directory, scandir'C:\Users\Operator\Dev\npm-ccache\node-typescript-bundle\1.0.0\package.tgz'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Operator\Desktop\npm-debug.log
I have taken the following steps.
Updated npm and node
Recreated the folders
npm cache clean
using the command prompt as administrator.
Searching for similar issues on google and stack overflow.
I am not sure what the issue is and any help would be appreciated. Usual npm install commands work perfectly fine.
I'm trying to do npm install on my project root where I have the package.json file. There is a git module in the dependencies of my package.json which I would like to install.
I have npm version 3.8.5 installed.
When I run npm install, I get the following error:
npm ERR! addLocal Could not install C:\Users\<username>\npm-global\Temp\npm-16864-a5deb5d4\git-cache-e02b7085\
ed488e2db50edd81e6db23865772ae34d4e446c5
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\<some-folder-path>\\nodejs\\node.exe" "C:\\<some-folder-path>\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.4.2
npm ERR! npm v3.8.5
npm ERR! path C:\Users\<username>\AppData\Roaming\npm-cache\<module-name>\0.0.2\package.tgz
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall scandir
npm ERR! enoent ENOENT: no such file or directory, scandir 'C:\Users\<username>\AppData\Roaming\npm-cache\ute-
gulp-tasks\0.0.2\package.tgz'
npm ERR! enoent ENOENT: no such file or directory, scandir 'C:\Users\<username>\AppData\Roaming\npm-cache\<module-name>\0.0.2\package.tgz'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
I can see the files created for the error npm ERR!
C:\Users\<username>\npm-global\Temp\npm-16864-a5deb5d4\git-cache-e02b7085\
ed488e2db50edd81e6db23865772ae34d4e446c5
and
C:\Users\<username>\AppData\Roaming\npm-cache\<module-name>\0.0.2\package.tgz
but for some reason npm could not access it.
Unfortunately, I could not find a solution for this issue anywhere.
It would be great if someone can help me out !!!
Thanks in advance !