npm list does not show installed package
I'm having trouble understanding npm. I have a node.js project with react, but I am not able to find the latter with npm list.
I certainly have it installed, because my project using react works.
I also have it in my package.json file under "dependencies":
"dependencies": {
"react": "^16.4.1"
}
Also, if I search for react on my drive, I find the module for it in my project folder:
user/Dev/project/node_modules/react
However, if I do npm list react, I get nothing:
me ~/D/project> npm list react
project@0.1.0 /Users/me/Dev/project
└── (empty)
Even if I do npm install or even specifically npm install react -save, no change.
Nor is the package listed with npm list or npm list -g (with or without --depth=0), except I get further indications that npm does not 'see' the react module:
UNMET PEER DEPENDENCY react@16.4.1
I'm using npm v5.6.0.
Any ideas?
I certainly have it installed, because my project using react works.
I also have it in my package.json file under "dependencies":
"dependencies": {
"react": "^16.4.1"
}
Also, if I search for react on my drive, I find the module for it in my project folder:
user/Dev/project/node_modules/react
However, if I do npm list react, I get nothing:
me ~/D/project> npm list react
project@0.1.0 /Users/me/Dev/project
└── (empty)
Even if I do npm install or even specifically npm install react -save, no change.
Nor is the package listed with npm list or npm list -g (with or without --depth=0), except I get further indications that npm does not 'see' the react module:
UNMET PEER DEPENDENCY react@16.4.1
I'm using npm v5.6.0.
Any ideas?
Комментарии
Отправить комментарий