lantian_no1
岚千
2021-06-10 19:55
采纳率: 0%
浏览 35

配置离线remix环境出错npm ERR! Missing script: "prepublish"

根据以下步骤在ubuntu下配置离线remix环境:

git clone https://github.com/ethereum/browser-solidity
cd browser-solidity
npm install
npm run prepublish

当执行到最后npm run prepublish时,提示错误:

npm ERR! Missing script: "prepublish"
npm ERR! 
npm ERR! Did you mean one of these?
npm ERR!     npm publish # Publish a package
npm ERR!     npm unpublish # Remove a package from the registry
npm ERR! 
npm ERR! To see a list of scripts, run:
npm ERR!   npm run

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/bluesky/.npm/_logs/2021-06-10T11_04_20_915Z-debug.log

 根据提示查看日志文件2021-06-10T11_04_20_915Z-debug.log:

0 verbose cli [
0 verbose cli   '/usr/local/node/node-v15.8.0-linux-x64/bin/node',
0 verbose cli   '/usr/local/node/node-v15.8.0-linux-x64/bin/npm',
0 verbose cli   'run',
0 verbose cli   'prepublish'
0 verbose cli ]
1 info using npm@7.16.0
2 info using node@v15.8.0
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:/usr/local/node/node-v15.8.0-linux-x64/lib/node_modules/npm/npmrc Completed in 1ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 0ms
9 timing config:load:project Completed in 2ms
10 timing config:load:file:/home/bluesky/.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:/usr/local/node/node-v15.8.0-linux-x64/etc/npmrc Completed in 1ms
13 timing config:load:global Completed in 1ms
14 timing config:load:validate Completed in 0ms
15 timing config:load:credentials Completed in 1ms
16 timing config:load:setEnvs Completed in 0ms
17 timing config:load Completed in 7ms
18 timing npm:load:configload Completed in 7ms
19 timing npm:load:setTitle Completed in 0ms
20 timing npm:load:setupLog Completed in 1ms
21 timing npm:load:cleanupLog Completed in 1ms
22 timing npm:load:configScope Completed in 0ms
23 timing npm:load:projectScope Completed in 0ms
24 timing npm:load Completed in 11ms
25 timing config:load:flatten Completed in 1ms
26 timing command:run-script Completed in 46ms
27 verbose stack Error: Missing script: "prepublish"
27 verbose stack
27 verbose stack Did you mean one of these?
27 verbose stack     npm publish # Publish a package
27 verbose stack     npm unpublish # Remove a package from the registry
27 verbose stack
27 verbose stack To see a list of scripts, run:
27 verbose stack   npm run
27 verbose stack     at RunScript.run (/usr/local/node/node-v15.8.0-linux-x64/lib/node_modules/npm/lib/run-script.js:105:13)
28 verbose cwd /home/bluesky/browser-solidity
29 verbose Linux 5.8.0-55-generic
30 verbose argv "/usr/local/node/node-v15.8.0-linux-x64/bin/node" "/usr/local/node/node-v15.8.0-linux-x64/bin/npm" "run" "prepublish"
31 verbose node v15.8.0
32 verbose npm  v7.16.0
33 error Missing script: "prepublish"
33 error
33 error Did you mean one of these?
33 error     npm publish # Publish a package
33 error     npm unpublish # Remove a package from the registry
33 error
33 error To see a list of scripts, run:
33 error   npm run
34 verbose exit 1

请问这种情况该怎么处理?

 

 

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

相关推荐