I can't install Express through npm install express. Actually I get an error if it try to install the dev dependency called content-type. https://www.npmjs.com/package/content-type
I tried to install the content-type package, it doesn't work. Here is the error:
60 error path C:\Users\kv\workspace\test\node_modules\content-type
61 error code ENOENT
62 error errno -4058
63 error syscall rename
64 error enoent ENOENT: no such file or directory, rename 'C:\Users\kv\workspace\test\node_modules\content-type' -> 'C:\Users\kv\workspace\test\node_modules\.content-type.DELETE'
65 error enoent This is related to npm not being able to find a file.
I use Windows 7 64 bit. I already installed Express once, 1 week ago, worked well.
Here is the full log file: https://pastebin.com/7S4MYLed
Does someone knows this issue and how to solve it? I already tried to reinstall Node.js/npm. I also cleared the cache and restarted my computer.
Remove your node_module file and run npm install command again. Hope this will work
It may be happening because your npm directory has not been initialised. Use:
npm init
to initialize the directory. Then use
npm install
to install dependencies. Also check package.json for dependencies.
Another workaround can be installing express generator .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.