Comments (7)
For me it's showing correct version
~ $ npx [email protected] --version
8.4.0
~ $ npm ls -g
/Users/testing/.nvm/versions/node/v22.0.0/lib
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
from cli.
% npx -v
10.7.0
% npx [email protected] --version
8.3.0
% npm ls -g
/opt/homebrew/lib
.
├── [email protected]
.
Anything else I could do to debug?
from cli.
does you cwd has that package installed ?
what does npm ls
shows from where you are running the command ?
from cli.
does you cwd has that package installed ? what does
npm ls
shows from where you are running the command ?
It's an empty folder.
% npm ls
/Users/mshima/git/test
└── (empty)
from cli.
@milaninfy I think a found a way to reproduce:
npm install -g [email protected] generator-jhipster-native@latest
% npx [email protected] --version
8.3.0
If I remove every global package and install the generator-jhipster
, it works.
Then if I install generator-jhipster-native
that have [email protected]
as a dependency, the problem is reproducible.
from cli.
I've added a console.log in /usr/local/lib/node_modules/npm/node_modules/libnpmexec/lib/index.js
:
// package requested by specific version
if (spec.type === 'version' && (node.pkgid === spec.raw)) {
console.log(node)
return { node }
It prints:
% npx [email protected] --version
⠦ArboristNode {
name: 'generator-jhipster',
version: '8.4.0',
location: 'node_modules/generator-jhipster-native/node_modules/generator-jhipster',
path: '/usr/local/lib/node_modules/generator-jhipster-native/node_modules/generator-jhipster',
.
.
.
8.3.0
generator-jhipster
inside generator-jhipster-native
is found. But the root (8.3.0) is used.
from cli.
Duplicated in a workspace off of latest
@wraithgar ➜ /workspaces/cli (latest) $ npx [email protected] --version
8.3.0
@wraithgar ➜ /workspaces/cli (latest) $ npm ls -g
/usr/local/share/nvm/versions/node/v20.12.1/lib
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
from cli.
Related Issues (20)
- [BUG] `npm ci` doesn't properly compare `package.json` with `package-lock.json` HOT 1
- [BUG] If the project name is node_modules, this error will be reported HOT 1
- [BUG] npm shows spinner while waiting for password
- [BUG] "There appears to be trouble with your network connection. Retrying..."
- [BUG] "There appears to be trouble with your network connection. Retrying..." HOT 2
- [Feature request] Support overriding `main`, `exports` and other package.json fields with `publishConfig` HOT 1
- [BUG] Installing an aliased package with an empty name will install the 'undefined' package HOT 2
- * OS: linux
- [BUG] Unable to install packages w/ brew linked node | macOS | NODE_EXTRA_CA_CERTS defined, behind ZScaler firewall HOT 2
- ### File `EIPS/(milehigh.world)eip-7708.md`
- Should npm init emit type=module? HOT 4
- [BUG] npm install progress bar not showing HOT 4
- npm is unable to authenticate when attempting to run npm install in my project folder HOT 2
- [BUG] npm audit fix --force installs a vulnerable version of puppeteer HOT 3
- [BUG] Get a package with optionnalDependencies from private registry. Get private package with `cpu` and `os` specified.
- Infosys Support Renewal FY25 HOT 1
- [BUG] ETARGET No matching version found after version update; cache clear helps HOT 6
- `npm edit` bug when editor path has a space in it
- This problem existed when there was no `[email protected]` published yet. Now I don't know how to reproduce it anymore.
- [BUG] npm install 'my-package' silently drops extra hard links to the same inode in node_modules/my-package HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.