安装 closurecompiler@1.6.1 失败

在安装grunt的时候,提示:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
$ cnpm i
√ Installed 8 packages
√ Linked 53 latest versions
[1/1] scripts.install grunt-closurecompiler@0.9.9 ? closurecompiler@>=1.2 run "npm run-script configure", root: "D:\\phpStudy\\PHPTutorial\\WWW\\gdfront\\ueditor_old\\node_modules\\_closurecompiler@1.6.1@closurecompiler"

> closurecompiler@1.6.1 configure D:\phpStudy\PHPTutorial\WWW\gdfront\ueditor_old\node_modules\_closurecompiler@1.6.1@closurecompiler
> node scripts/configure.js

Configuring ClosureCompiler.js 1.6.1 ...

Downloading https://dl.google.com/closure-compiler/compiler-latest.tar.gz ...
? Download failed: Error: Download failed: HTTP status code 404

? Unfortunately, ClosureCompiler.js could not be configured.
See: https://github.com/dcodeIO/ClosureCompiler.js (create an issue maybe)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! closurecompiler@1.6.1 configure: `node scripts/configure.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the closurecompiler@1.6.1 configure script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Caffrey\.npminstall_tarball\_logs\2021-04-13T06_53_17_040Z-debug.log
[npminstall:runscript:error] grunt-closurecompiler@0.9.9 ? closurecompiler@>=1.2 scripts.install run "npm run-script configure" error: Error [RunScriptError]: Run "C:\Windows\system32\cmd.exe /d /s /c npm run-script configure" error, exit code 1
at ChildProcess.<anonymous> (D:\nvm\v12.18.0\node_modules\cnpm\node_modules\runscript\index.js:96:21)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) {
stdio: [Object],
exitcode: 1
}
× Install fail! RunScriptError: post install error, please remove node_modules before retry!
Run "C:\Windows\system32\cmd.exe /d /s /c npm run-script configure" error, exit code 1
RunScriptError: Run "C:\Windows\system32\cmd.exe /d /s /c npm run-script configure" error, exit code 1
at ChildProcess.<anonymous> (D:\nvm\v12.18.0\node_modules\cnpm\node_modules\runscript\index.js:96:21)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
npminstall version: 3.28.0
npminstall args: D:\Program Files\nodejs\node.exe D:\nvm\v12.18.0\node_modules\cnpm\node_modules\npminstall\bin\install.js --fix-bug-versions --china --userconfig=C:\Users\Caffrey\.cnpmrc --disturl=https://npm.taobao.org/mirrors/node --registry=https://r.npm.taobao.org

首选全局安装 closurecompiler

1
npm install -g closurecompiler


1
cnpm install -g closurecompiler

然后在安装grunt,我这里是有package.json,所以直接cnpm i

坚持原创技术分享,您的支持将鼓励我继续创作!
0%