npm failing to install packages with local dependency - npm

I am having problems installing an npm package that has a file dependency off of github. When installing directly from a local package there are no problems.
The package that I am trying to install has a dependency on a package defined within on of its subdirectories.
The error I am getting is as follows:
npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules/local-dependency-example/local-dependency" as it does not contain a package.json file.
I created the following package in order to reproduce: https://github.com/eladzlot/local-dependency-example
In order to reproduce you should create an empty package: npm init.
Then attempt to install: npm install eladzlot/local-dependency-example --save.
This problem occurs both with npm v3.10.10 and npm v5.5.1

Related

I cannot npm install with just created vue2 + vuetify proj

installed latest vue/cli and created project using vue2.
After this, I added vuetify and thats all for additional to basic vue2 template list of packages.
When I have tryed to use 'npm install'
Found: #vue/cli-service#undefined
npm ERR! node_modules/#vue/cli-service
npm ERR! dev #vue/cli-service#"5.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #vue/cli-service#"^3.0.0 || ^4.0.0 || ^5.0.0-0" from #vue/cli-plugin-babel#5.0.0
npm ERR! node_modules/#vue/cli-plugin-babel
npm ERR! dev #vue/cli-plugin-babel#"5.0.0" from the root project`
can you guys explain me meaning of error
myVersions
As you are seemingly on an old version of npm (<=6.x) you need to install the peer dependency yourself:
npm i -D #vue/cli-service#5.0.0
After installing the dependency, edit your package.json and insert this block on the top level, right after the "devDependencies" object:
"peerDependencies": {
"#vue/cli-service": "^5.0.0"
}
and remove that dependency from the "devDependencies" object.
If you don't want to deal with peer dependencies yourself, upgrade your node and npm version. To upgrade npm only:
npm i -g npm
Despite the fact that I reconfigured entire project. I will anyway answer this question.
Issue was related to cli-service 5.0.0, when I should have had 5.0.8 in order to use babel 5.0.0.
I want to add that if you use default vue.2 template with vue/cli 5.0.8,
You will get another error after installing vuetify, which was not able to fix.
Error is related to vuetify loader.
I fixed it with start up new project and manually inserting all dependencies compatible with vuetify-loader 1.5
Because 1.7 brakes npm run serve

npm ERR! code ENOLOCAL while running npm install

I am facing the error below, I tried clear the cache and install npm latest but all are no use to me, may I know is there any way to resolve it?
> npm install
npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules\tui-editor\squire-rte#github:seonim-ryu\Squire#fd40b4e3020845825701e9689f190bab3f4775d4" as it does not contain a package.json file.
you should try to delete node modules folder repeatedly and reinstall packages by npm install command
npm cache clean try this command after deleted node modules

NPM install not work and make lock-json file

Hi I'm trying to install npm to run a kit.
my node version is: v12.18.3
my npm version is: 6.14.6
my folder is "test" and I'm installing npm with this command:
Kian#DESKTOP-CL16DA7 MINGW64 /d/markitdone/test
$ npm install
npm WARN saveError ENOENT: no such file or directory, open 'D:\markitdone\test\package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open 'D:\markitdone\test\package.json'
npm WARN test No description
npm WARN test No repository field.
npm WARN test No README data
npm WARN test No license field.
up to date in 0.845s
found 0 vulnerabilities
Could someone help me please?
Before you use npm install.
You need to create a project, either React, Vue.js or Angular in your test directory

Can't install ESLint in project folder - npm error code ENOSELF

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

Can't install "react native cli" globally by using git bash

When I type in "npm install -g react-native-cli" at git bash I get following errors:
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at: npm ERR! https://github.com/npm/npm/issues
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\TOSHIBA İ5\AppData\Roaming\npm-cache_logs\2017-10-19T04_04_05_774Z-debug.log
I have already installed npm and added it's directory to PATH variable and when i type "which npm" at git bash it shows the directory so there is no problem about the installation of npm. But it still gives these errors and I am stuck.
Note: I am following the instructions on https://shift.infinite.red/getting-started-with-react-native-development-on-windows-90d85a72ae65
This could happen in some npm old versions. Make sure you are using an updated one.
npm install -g npm
Some linux distros have old versions of npm and node on their packages and you need to install it manually.
Edit: I just saw you have windows. Nevermind, still the old version could be a problem.