-
Notifications
You must be signed in to change notification settings - Fork 16
Description
我在安装npm install @pansy/react-amap时出现错误,但是yarn add @pansy/react-amap可以,而项目中必须使用npm。错误信息:
npm error Unable to resolve reference $react
npm error A complete log of this run can be found in: /Users/xzs/.npm/_logs/2024-05-17T00_07_13_897Z-debug-0.log
log文件:
0 verbose cli /usr/local/bin/node /usr/local/bin/npm
1 info using npm@10.7.0
2 info using node@v22.2.0
3 silly config:load:file:/usr/local/lib/node_modules/npm/npmrc
4 silly config:load:file:/Users/xzs/my-hilla-app/.npmrc
5 silly config:load:file:/Users/xzs/.npmrc
6 silly config:load:file:/usr/local/etc/npmrc
7 verbose title npm install @pansy/react-amap
8 verbose argv "install" "@pansy/react-amap"
9 verbose logfile logs-max:10 dir:/Users/xzs/.npm/_logs/2024-05-17T00_07_13_897Z-
10 verbose logfile /Users/xzs/.npm/_logs/2024-05-17T00_07_13_897Z-debug-0.log
11 silly logfile start cleaning logs, removing 1 files
12 silly logfile done cleaning log files
13 silly idealTree buildDeps
14 silly fetch manifest @pansy/react-amap@^2.20.1
15 http fetch GET 200 https://registry.npmjs.org/@pansy%2freact-amap 1136ms (cache revalidated)
16 silly placeDep ROOT @pansy/react-amap@2.20.1 OK for: want: ^2.20.1
17 silly fetch manifest @pansy/amap-api-loader@0.4.10
18 silly fetch manifest @pansy/amap-types@2.22.0
19 silly fetch manifest @pansy/react-amap-core@1.3.14
20 silly fetch manifest @pansy/use-portal@^0.2.2
21 http fetch GET 200 https://registry.npmjs.org/@pansy%2famap-api-loader 425ms (cache revalidated)
22 http fetch GET 200 https://registry.npmjs.org/@pansy%2fuse-portal 1025ms (cache revalidated)
23 http fetch GET 200 https://registry.npmjs.org/@pansy%2famap-types 1127ms (cache revalidated)
24 http fetch GET 200 https://registry.npmjs.org/@pansy%2freact-amap-core 1477ms (cache revalidated)
25 verbose stack Error: Unable to resolve reference $react
25 verbose stack at get spec (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/edge.js:202:15)
25 verbose stack at #nodeFromEdge (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1054:46)
25 verbose stack at #loadPeerSet (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1320:35)
25 verbose stack at #nodeFromEdge (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1097:29)
25 verbose stack at async #buildDepStep (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:923:11)
25 verbose stack at async Arborist.buildIdealTree (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:203:7)
25 verbose stack at async Promise.all (index 1)
25 verbose stack at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:131:5)
25 verbose stack at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:150:5)
25 verbose stack at async module.exports (/usr/local/lib/node_modules/npm/lib/cli/entry.js:74:5)
26 verbose cwd /Users/xzs/my-hilla-app
27 verbose Darwin 23.4.0
28 verbose node v22.2.0
29 verbose npm v10.7.0
30 error Unable to resolve reference $react
31 verbose exit 1
32 verbose code 1
33 silly unfinished npm timer reify 1715904434074
34 silly unfinished npm timer reify:loadTrees 1715904434076
35 silly unfinished npm timer idealTree:buildDeps 1715904434209
36 silly unfinished npm timer idealTree:node_modules/@pansy/react-amap 1715904436834
37 error A complete log of this run can be found in: /Users/xzs/.npm/_logs/2024-05-17T00_07_13_897Z-debug-0.log