antd 编译报错

新手上路,请多包涵

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至最新版

阅读 3.5k
1 个回答

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

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题