I keep getting `errno 4058` from npm - npm

I used npm in the last weeks without any problems, but all of the sudden i keep getting this error:
npm ERR! path J:\Work\Web_server\create_file\node_modules\depd
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'J:\Work\Web_server\create_file\node_modules\depd' -> 'J:\Work\Web_server\create_file\node_modules\.depd.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\crist\AppData\Roaming\npm-cache\_logs\2018-08-13T09_21_56_509Z-debug.log
This is the package.json:
{
"name": "create_file",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies":{
},
"devDependencies":{
"express": "4.16.3"
}
}
The thing is, it also happens when I manually install a package. What am I doing wrong? Thanks
Edit: And when I tried it on a different directory the manual installation worked. I have no idea why.

I faced the same error on macOS 10.12.6, Node 8.3.0, NPM 5.3.0. It often, but not always is referring to .DELETE. It does always report ENOENT: no such file or directory
There are no other Node processes running. I closed Visual Studio Code, still seeing ENOENT.
QuickFix:
Delete package-lock.json and run NPM again

try this to solve your error
1st check your port is running or not through this command
lsof -i :8080 // <- this is your port whatever you used
the port is cotinuesly run or not if it run then use the below command
kill -9 14528 //your procee Id
then once try to run
node index.js

Related

NPM - cant install Packeges

Terminal input:
npm init -y working as expected,
npm install --save cors nodedom express socket.io
getting this eror:
npm ERR! 404 Object Not Found - GET https://skimdb.npmjs.com/registry/nodedom - not_found
npm ERR! 404
npm ERR! 404 'nodedom#latest' is not in the npm registry.
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Guy Arieli\AppData\Roaming\npm-cache\_logs\2021-01-14T17_02_20_885Z-debug.log
PS C:\Code\React\Chattime\server> npm config set registry https://skimdb.npmjs.com/registry
npm ERR! code E404
npm ERR! 404 Object Not Found - GET https://skimdb.npmjs.com/registry/nodedom - not_found
npm ERR! 404
npm ERR! 404 'nodedom#latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Guy Arieli\AppData\Roaming\npm-cache\_logs\2021-01-14T17_03_26_067Z-debug.log
+ create-react-app#4.0.1
updated 1 package in 163.864s
where is the package.jason :
{
"name": "server",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
When I clone a project with this packets all work well however when I try to install via terminal things don't work as expected.
As the error message says, a package called nodedom is not available on npm.
Did you mean either: node-dom
or did you mean nodemon

How to tell npm to install from local not git

I have a server without internet access but a local npm. I'm trying to install a Node.js application, and one of the modules points to github. The package is part of one of the dependencies packages.
{
"name": "doccano",
"version": "1.0.0",
"description": "doccano is an open source annotation tools for machine learning practitioner.",
"author": "Hironsan",
"private": true,
"scripts": {
...
"dependencies": {
...
"#toast-ui/vue-editor": "^1.1.1",
...
}
}
Most packages are downloaded from local npm, but some point to github, and then I get the error:
npm install
...
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git#github.com/seonim-ryu/Squire.git
npm ERR!
npm ERR! ssh: Could not resolve hostname github.com: Name or service not known
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128
I can download the repository and upload it to the server, but how can I install the github packages?

Electron app won't run. cant figure out why

when typing npm start it gives me this error:
npm ERR! errno 1
npm ERR! helloworld#1.0.0 start: `electron .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the helloworld#1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
here is the package.json
{
"name": "helloworld",
"version": "1.0.0",
"description": "my app",
"main": "main.js",
"scripts": {
"start": "electron ."
},
"author": "kamalyaka",
"license": "MIT"
}
Please help.
You need to first install all the dependencies.
Try executing
npm install
first in your project directory.
After the dependencies are installed then you can execute
npm start
which will start your electron app.

How to solve npm ERR! missing script: dev

I have installed node.js.
Next, I installed cnmp with command
npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm install
when I tried command cnpm run dev
there is a error:
npm ERR! path C:\Users\Harry\package.json
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\Harry\package.json'
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\Harry\AppData\Roaming\npm-cache\_logs\2018-08-03T02_48_22_663Z-debug.log
so I moved the package.json from C:\Users\Harry\AppData\Roaming\npm\node_modules\cnpm to 'C:\Users\Harry\package.json'
but I still got an error:
npm ERR! missing script: dev
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Harry\AppData\Roaming\npm-cache\_logs\2018-08-03T02_51_46_194Z-debug.log
and I also tried methods of similar problems, such as edit the script in package.json, it still doesn't work.
Perhaps you are using the Vue CLI 3? If yes, there is no "dev" build script. Earlier versions of the Vue 2 boilerplate project had a "dev" script - but no longer.
Instead use the "serve" script and your Vue project will run as dev
npm run serve
See the scripts that are configured with Vue CLI 3 in the package.json file
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint" },
Hope that solves your issue.

Bootstrap4-NPM start error

I am learning to automate web development tasks using npm scripts.
Below is my package.json:
{
"name": "confusion",
"version": "1.0.0",
"description": "This is a website for Ristorante Con Fusion",
"main": "index.html",
"scripts": {
"start": "npm run watch:all",
"test": "echo \"Error: no test specified\" && exit 1",
"lite": "lite-server",
"scss": "node-sass -o css/ css/",
"watch:scss": "onchange 'css/*.scss' --npm run scss",
"watch:all": "parallelshell 'npm run watch:scss' 'npm run lite'"
},
"author": "",
"license": "ISC",
"devDependencies": {
"lite-server": "^2.2.2",
"node-sass": "^4.7.2",
"onchange": "^3.3.0",
"parallelshell": "^3.0.2"
},
"dependencies": {
"bootstrap": "^4.0.0-alpha.6",
"font-awesome": "^4.7.0"
}
}
However, when I run npm start in the command prompt I encounter the following error:
Error message:
D:\encypher technologies\Bootstrap4-starter\Bootstrap4\conFusion>npm start
confusion#1.0.0 start D:\encypher technologies\Bootstrap4-starter\Bootstrap4\conFusion
npm run watch:all
confusion#1.0.0 watch:all D:\encypher technologies\Bootstrap4-starter\Bootstrap4\conFusion
parallelshell 'npm run watch:scss' 'npm run lite'
'npm' is not recognized as an internal or external command, operable program or batch file.
'run' is not recognized as an internal or external command, operable program or batch file.
The filename, directory name, or volume label syntax is incorrect.
'npm' is not recognized as an internal or external command,
operable program or batch file.
'run' is not recognized as an internal or external command, operable program or batch file.
'lite'' is not recognized as an internal or external command, operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! confusion#1.0.0 watch:all: 'parallelshell 'npm run watch:scss' 'npm run lite'
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the confusion#1.0.0 watch:all script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\NIKHIL\AppData\Roaming\npm-cache\_log\2018-01-08T11_13_45_703Z-debug.log
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\NIKHIL\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v8.9.3
npm ERR! npm v2.15.12
npm ERR! code ELIFECYCLE
npm ERR! confusion#1.0.0 start: 'npm run watch:all'
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the confusion#1.0.0 start script 'npm run watch:all'.
npm ERR! This is most likely a problem with the confusion package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run watch:all
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs confusion
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls confusion
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! D:\encypher technologies\Bootstrap4-starter\Bootstrap4\conFusion\npm-debug.log
I guess you are using Windows. The Windows command line doesn't like single quotes in package.json. Use \" instead.
"watch:scss": "onchange \"css/*.scss\" -- npm run scss",
"watch:all": "parallelshell \"npm run watch:scss\" \"npm run lite\""
You were also missing the space between -- and npm.