expressjs / multer

Node.js middleware for handling `multipart/form-data`.
MIT License
11.61k stars 1.06k forks source link

Cannot install multer #598

Closed MarcLunel closed 6 years ago

MarcLunel commented 6 years ago

Hi ! I've try to install multer with npm install --save multer but it doesn't work as we can read below.

npm ERR! path C:\Users\me\Desktop\DeveloppementWeb\myMovies\server\node_modules\npm\node_modules\libcipm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\http-proxy-agent\node_modules\agent-base\node_modules\es6-promisify\node_modules\es6-promise
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\me\Desktop\DeveloppementWeb\myMovies\server\node_modules\npm\node_modules\libcipm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\http-proxy-agent\node_modules\agent-base\node_modules\es6-promisify\node_modules\es6-promise' -> 'C:\Users\me\Desktop\DeveloppementWeb\myMovies\server\node_modules\npm\node_modules\libcipm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\http-proxy-agent\node_modules\agent-base\node_modules\es6-promisify\node_modules\.es6-promise.DELETE'
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!     C:\Users\me\AppData\Roaming\npm-cache\_logs\2018-06-06T16_58_37_884Z-debug.log

I'm using Node V8.11.2 and npm V5.6.

How can I do please ?

MarcLunel commented 6 years ago

I solved my problem.

Instead of typing npm install --save multer in my server folder, I went back to my project folder (including server and client folders) and I typed my code here. It worked !

Tzahile commented 4 years ago

For anyone who comes from a google search like me, I had this issue as well.

Instead of typing npm install --save multer in my server folder, I went back to my project folder (including server and client folders) and I typed my code here. It worked !

For me it's impossible to do so. I'm in the project's folder and there lays my package.json, I don't have any outer folder to go to. My error message is similar, but complains about another dependency (busboy);

I use node 13.2.0 npm 6.13.1, express 5.0.0-alpha,7:

npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path C:\Projects\path\to\my\Server\node_modules\busboy\node_modules
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\Projects\path\to\my\Server\node_modules\busboy\node_modules'
npm ERR!  [OperationalError: EPERM: operation not permitted, mkdir 'C:\Projects\path\to\my\Server\node_modules\busboy\node_modules'] {
npm ERR!   cause: [Error: EPERM: operation not permitted, mkdir 'C:\Projects\path\to\my\Server\node_modules\busboy\node_modules'] {
npm ERR!     errno: -4048,
npm ERR!     code: 'EPERM',
npm ERR!     syscall: 'mkdir',
npm ERR!     path: 'C:\\Projects\\path\\to\\my\\Server\\node_modules\\busboy\\node_modules'
npm ERR!   },
npm ERR!   stack: "Error: EPERM: operation not permitted, mkdir 'C:\\Projects\\path\\to\\my\\Server\\node_modules\\busboy\\node_modules'",
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: 'C:\\Projects\\path\\to\\my\\Server\\node_modules\\busboy\\node_modules',
npm ERR!   parent: 'busboy'
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 solved it by doing npm install all again after I removed package-lock.json and node_modules

hpbha commented 3 years ago

just delete package-lock.json folder then it will get installed