npm ERR! code ENOTEMPTY npm ERR! syscall rename when installing any npm dependency in a Nextjs Project - node.js

premium_app[main] $ npm install --save multer
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /home/nyambura/premium/premium_app/node_modules/ansi-regex
npm ERR! dest /home/nyambura/premium/premium_app/node_modules/.ansi-regex-N772AMTl
npm ERR! errno -39
npm ERR! ENOTEMPTY: directory not empty, rename '/home/nyambura/premium/premium_app/node_modules/ansi-regex' -> '/home/nyambura/premium/premium_app/node_modules/.ansi-regex-N772AMTl'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/nyambura/.npm/_logs/2021-06-25T19_25_58_561Z-debug.log
I'm getting an instance of such an error when I try downloading any npm dependency. I tried updating node and npm in my Ubuntu and refreshing my terminals, but still. I wholly evaded this by switching to yarn for installing the relative dependencies. What could be the problem with my npm?

Related

can't install node express on windows 10

I am trying to set up a node express development environment on windows 10. I have successfully installed node.js and npm but when I try to install express using:
npm init
npm install express
I get the following error:
npm WARN myapp#1.0.0 No description
npm WARN myapp#1.0.0 No repository field.
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path C:\Users\mi292519\Dropbox\selfLearning\nodeJs\myapp\node_modules\bytes
npm ERR! dest C:\Users\mi292519\Dropbox\selfLearning\nodeJs\myapp\node_modules\.bytes.DELETE
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\mi292519\Dropbox\selfLearning\nodeJs\myapp\node_modules\bytes' -> 'C:\Users\mi292519\Dropbox\selfLearning\nodeJs\myapp\node_modules\.bytes.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\mi292519\AppData\Roaming\npm-cache\_logs\2020-10-07T11_17_07_099Z-debug.log
I tried removing node_modules and package.json also tried deleting npm-cache and npm install again but none of that worked
any help would be appreciated
Thanks!

Trying to install npm on Raspberry Pi Error

I am working on a simple smart mirror project with javascript and electron. I was able to get the software working on my laptop but when I moved it to the raspberry pi I am having issues installing npm. After entering "npm install" I get this:
npm WARN package.json bcrypt-pbkdf#1.0.1 No repository field.
npm ERR! 404 Not Found
npm ERR! 404
npm ERR! 404 'types/jquery' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 It was specified as a dependency of 'smart-mirror-server'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.
npm ERR! System Linux 4.9.24-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/pi/Desktop/smart-connected-mirror-master
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code E404
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/Desktop/smart-connected-mirror-master/npm-debug.log
npm ERR! not ok code 0
I have tried
sudo apt-get update
as well as
sudo apt-get upgrade
Any ideas what to do? Thanks!
EDIT:
I updated the node.js to a more current version and now it installed without error. However, when I typed in the command
npm start
I get this:
sh: 1: electron: Permission denied
npm ERR! Linux 4.9.24-v7+
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v7.10.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! smart-mirror-server#1.0.0 start: `electron .`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the smart-mirror-server#1.0.0 start script 'electron .'.
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 smart-mirror- server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! electron .
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs smart-mirror-server
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls smart-mirror-server
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/.npm/_logs/2017-05-29T03_33_22_466Z-debug.log
Have you seen this issue? Electron works only on RaspberryPi 2/3 what version are you using?
Also have you run npm install before actually run the app? Sometimes when copying node_modules from OS to OS the executable permissions get very confused.
You can try a fresh install with: rm -rf node_modules && npm install

npm start doesn't work after i do npm unlink

npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/myName/.nvm/versions/node/v5.12.0/bin/node" "/Users/myName/.nvm/versions/node/v5.12.0/bin/npm" "start"
npm ERR! node v5.12.0
npm ERR! npm v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! appName#1.5.1 start: `ember server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the appName start script 'ember server'.
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 appName package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ember server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs appName
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls appName
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/myName/Documents/Dev/ember-project-name/npm-debug
I linked gooey, one of my projects, to another project: ember, now i wanted to unlink them
so i did npm unlink
then npm start didn't work no matter what i did.
things I've tried:
npm install several times,
bower install several times,
rm -rf node_modules
rm -rf bower_components
npm install several times
npm start kept giving errors, like can't find some file in gooey or tell author that ember server failed
The solution:
option 1:
first do npm link so that it installs everything it needs
then npm install, then npm start will start working again.
option2:
if you want to unlink, do:
npm unlink
npm update
npm start
that should work too.
try npm install again before npm start if you have problems.

How to run npm install for EEXIST error

When I do an npm install I get the foll
node_modules \wdpr-grunt-tasks\node_modules\karma\node_modules\socket.io\node_modules\socket. io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-valid ate>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_ modules\node-gyp\bin\node-gyp.js" rebuild
npm WARN optional dep failed, continuing utf-8-validate#1.2.1
npm ERR! EEXIST, npm-cache\56f3dfab--cac he-lodash-3-10-1-package-tgz.lock'
File exists: 56f3dfab--cache-lodash- 3-10-1-package-tgz.lock
Move it away, and try again.
npm ERR! System Windows_NT 6.1.7601
npm ERR! node -v v0.10.36
npm ERR! npm -v 1.4.28
npm ERR! path ... -3-10-1-package-tgz.lock
npm ERR! code EEXIST
npm ERR! errno 47
How do I resolve this issue?
You can try to clean your npm cache with command:
npm cache clean
To make sure, you can delete node_modules folder and install all modules again.

Using npm to install grunt on nodeenv results in findup-sync error

After establishing a node virtualenv using nodeenv, I use source /bin/activate
to switch into the correct directory, update npm, and execute
npm install -g grunt or npm install -g grunt-cli and I recieve the same error:
npm ERR! Linux 3.13.0-53-generic
npm ERR! argv "node" "/home/{redacted-home-dir}/NodeProjects/vue/bin/npm" "install" "-g" "grunt-cli"
npm ERR! node v0.12.4
npm ERR! npm v2.11.1
npm ERR! file /home/{redacted-home-dir}/.npm/findup-sync/0.1.3/package/package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! No data, empty input at 1:1
npm ERR!
npm ERR! ^
npm ERR! File: /home/{redacted-home-dir}/.npm/findup-sync/0.1.3/package/package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse
npm ERR! Please include the following file with any support request:
npm ERR! /home/{redacted-home-dir}/NodeProjects/vue/npm-debug.log
A similar error was noted on the findup-sync Github, but this the most recent edition of npm.
Grunt's package.json says "approximately 0.1.2" according to the npm docs.
I also have tried installing findup-sync independently, to no avail.
Other details about my computer: Linux (Debian/Ubuntu 14.04). 64bit.
You have maybe a corrupted cache : npm cache clean

Resources