After npm install in project local directory I've got log with error like this
npm ERR! code ENOLOCAL
npm ERR! Could not install from "..{path}" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/home/.npm/_logs/2018-06-28T11_13_56_437Z-debug.log
How I can resolve this problem? (the best way without deleting node-modules)
Related
I just wanna install dependencies for my project after cleaning "node_module" folder and deleting package-lock.json file:
npm install
And always get an error:
npm ERR! code EINVALIDTAGNAME
npm ERR! Invalid tag name "^" of package "eslint-plugin-react#^": Tags may not have
any characters that encodeURIComponent encodes.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Admin\AppData\Local\npm-cache\_logs\2023-01-31T16_45_46_763Z-
debug-0.log
and the same error when using yarn.
Current npm version: 8.19.2
Command npm publish --registry "https://some-private-registry.com" running from package home.
Produces the following error:
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\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! <somewhere>
I tried passing current folder as argument, i.e. npm publish "C:\path-to-folder" --registry "https://some-private-registry.com" running from package home, but with no success - the error stays the same. npm prefix correctly returns current folder.
For some reason - which I cannot understand - publish searches for package.json at disk root. Which is also important, npm unpublsh and npm install work without any issue.
Debug log also doesn't provide any sufficient information except above error.
Is there anything I might miss which could be causing the problem?
Thanks!
My create-react-app not working when I run the following command:
npm install create-react-app -g
Here is the output I get:
npm ERR! code EEXIST
npm ERR! path C:\Users\Raisa IT\AppData\Roaming\npm\node_modules\create-react-app\index.js
npm ERR! dest C:\Users\Raisa IT\AppData\Roaming\npm\create-react-app.cmd
npm ERR! EEXIST: file already exists, cmd shim 'C:\Users\Raisa IT\AppData\Roaming\npm\node_modules\create-react-app\index.js' -> 'C:\Users\Raisa IT\AppData\Roaming\npm\create-react-app.cmd'
npm ERR! File exists: C:\Users\Raisa IT\AppData\Roaming\npm\create-react-app.cmd
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Raisa IT\AppData\Roaming\npm-cache\_logs\2021-01-06T13_18_41_018Z-debug.log
How would I go about solving this issue?
This error is saying that create-react-app already exists. Try running create-react-app.
I'm struggling to install ESLint from my terminal (locally in my project folder).
I'm running this command:
sudo npm install eslint --save-dev
However, an npm error with code ENOSELF is returned, with the following message
npm ERR! code ENOSELF
npm ERR! Refusing to install package with name "eslint" under a package
npm ERR! also called "eslint". Did you name your project the same
npm ERR! as the dependency you're installing?
npm ERR!
npm ERR! For more information, see:
npm ERR! <https://docs.npmjs.com/cli/install#limitations-of-npms-install-algorithm>
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/[username]/.npm/_logs/2020-01-07T14_32_27_111Z-debug.log
I have no folder nor files named eslint or anything remotely close to that. In my project directory I have a collection of html, js and csv files that have been edited with VSCode.
I'm really confused why this error is happening, and would appreciate help.
Make sure that the name property in your package.json is not eslint
I am following this tutorial on vue.js on YouTube. One of the packages I installed was eslint 5.5 (which is the current version). I saw this error message:
npm ERR! Failed at the server#1.0.0 lint script 'eslint **/*.js'.
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 server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! eslint **/*.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs server
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls server
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/jason/Documents/vue-movie/server/npm-debug.log
I tried updating Node and NPM, but that did not change this failure. The tutorial is using "^4.6" and I was wondering if there is a way to revert the package I have to an earlier version? And how would I do that?