antd 编译报错

发布于 2022-09-06 00:02:34 字数 3849 浏览 18 评论 0

npm run dist报错

从git中clone下来

  • 执行
    npm install
  • 异常报错
    0 info it worked if it ends with ok
    1 verbose cli [ 'D:\\nodejs\\node.exe',
    1 verbose cli   'D:\\nodejs\\modules\\node_global\\node_modules\\cnpm\\node_modules\\npm\\bin\\npm-cli.js',
    1 verbose cli   '--userconfig=C:\\Users\\admin\\.cnpmrc',
    1 verbose cli   '--disturl=https://npm.taobao.org/mirrors/node',
    1 verbose cli   '--registry=http://registry.npm.taobao.org',
    1 verbose cli   'run',
    1 verbose cli   'dist' ]
    2 info using npm@5.4.2
    3 info using node@v8.4.0
    4 verbose run-script [ 'predist', 'dist', 'postdist' ]
    5 info lifecycle antd@2.13.4~predist: antd@2.13.4
    6 info lifecycle antd@2.13.4~dist: antd@2.13.4
    7 verbose lifecycle antd@2.13.4~dist: unsafe-perm in lifecycle true
    8 verbose lifecycle antd@2.13.4~dist: PATH: D:\nodejs\modules\node_global\node_modules\cnpm\node_modules\npm\bin\node-gyp-bin;Z:\source\ant-design\node_modules\.bin;C:\Program Files (x86)\Common Files\NetSarang;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Java\jdk1.8.0_121\bin;C:\Program Files\Java\jdk1.8.0_121\jre\bin;D:\Program Files\TortoiseSVN\bin;d:\Program Files\Git\cmd;D:\Program Files\TortoiseGit\bin;D:\nodejs\;
    9 verbose lifecycle antd@2.13.4~dist: CWD: Z:\source\ant-design
    10 silly lifecycle antd@2.13.4~dist: Args: [ '/d /s /c', 'antd-tools run dist' ]
    11 silly lifecycle antd@2.13.4~dist: Returned: code: 1  signal: null
    12 info lifecycle antd@2.13.4~dist: Failed to exec dist script
    13 verbose stack Error: antd@2.13.4 dist: `antd-tools run dist`
    13 verbose stack Exit status 1
    13 verbose stack     at EventEmitter.<anonymous> (D:\nodejs\modules\node_global\node_modules\cnpm\node_modules\npm\node_modules\npm-lifecycle\index.js:280:16)
    13 verbose stack     at emitTwo (events.js:125:13)
    13 verbose stack     at EventEmitter.emit (events.js:213:7)
    13 verbose stack     at ChildProcess.<anonymous> (D:\nodejs\modules\node_global\node_modules\cnpm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
    13 verbose stack     at emitTwo (events.js:125:13)
    13 verbose stack     at ChildProcess.emit (events.js:213:7)
    13 verbose stack     at maybeClose (internal/child_process.js:927:16)
    13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
    14 verbose pkgid antd@2.13.4
    15 verbose cwd Z:\source\ant-design
    16 verbose Windows_NT 10.0.14393
    17 verbose argv "D:\\nodejs\\node.exe" "D:\\nodejs\\modules\\node_global\\node_modules\\cnpm\\node_modules\\npm\\bin\\npm-cli.js" "--userconfig=C:\\Users\\admin\\.cnpmrc" "--disturl=https://npm.taobao.org/mirrors/node" "--registry=http://registry.npm.taobao.org" "run" "dist"
    18 verbose node v8.4.0
    19 verbose npm  v5.4.2
    20 error code ELIFECYCLE
    21 error errno 1
    22 error antd@2.13.4 dist: `antd-tools run dist`
    22 error Exit status 1
    23 error Failed at the antd@2.13.4 dist script.
    23 error This is probably not a problem with npm. There is likely additional logging output above.
    24 verbose exit [ 1, true ]

常试了重装node至最新版

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

唐婉 2022-09-13 00:02:34

建议去 Antd 那儿提ISSUE,他们的问题

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文