How do can I see a complete list of the modules installed by ´npm install´ command?
Example: npm list react-native-modules
答案 0 :(得分:2)
以下命令将为您提供当前目录中安装的npm软件包列表。
npm ls --depth=0
您可以设置深度值以查看已安装软件包的依赖关系。
即npm ls --depth=1
答案 1 :(得分:1)
If you are not adding any arguments to the npm install
command, it installs all items in your package.json
. There are all installed in that directory in the node_modules folder.
This is a faculty of NPM and does not really have anything specifically to do with React Native (which makes me hope I understand your question correctly :\ ).
Either way, here are more details on the command from the NPM docs:
npm install (in package directory, no arguments):
Install the dependencies in the local node_modules folder.
In global mode (ie, with -g or --global appended to the command), it installs the current package context (ie, the current working directory) as a global package.
By default, npm install will install all modules listed as dependencies in package.json.
With the --production flag (or when the NODE_ENV environment variable is set to production), npm will not install modules listed in devDependencies.
EDIT:
You can also see all packages + dependencies installed in a Tree-like structure with npm ls
, just make sure you are in your project directory. -- more data here
答案 2 :(得分:1)
您可以在 package.json -> dependencies 中找到它们 例如:
"dependencies": {
"@chakra-ui/react": "^1.6.5",
"@emotion/react": "^11.4.0",
"@emotion/styled": "^11.3.0",
"@react-icons/all-files": "^4.1.0",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
"axios": "^0.21.1",
"bootstrap": "^4.6.0",
"formik": "^2.2.9",
"framer-motion": "^4.1.17",
"react": "^17.0.2",
"react-bootstrap": "^1.6.1",
"react-datepicker": "^4.1.1",
"react-dom": "^17.0.2",
"react-icons": "^4.2.0",
"react-modal": "^3.14.3",
"react-scripts": "4.0.3",
"react-toastify": "^7.0.4",
"web-vitals": "^1.1.2",
"yup": "^0.32.9"
},