我正在尝试在Azure DevOps管道中的WebPack代理下运行webpack命令。但是我得到了下面的错误。我该如何解决这个问题?
executing the command: node "***\node_modules\webpack\bin\webpack.js" --json --config
../***/webpack.config.js
##[debug]task result: Failed
##[error]webpack failed
##[debug]Processed: ##vso[task.issue type=error;]webpack failed
(node:9812) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:9812) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:9812) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:9812) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:9812) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:9812) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:9812) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:9812) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:9812) Warning: Use Cipheriv for counter mode of aes-256-ctr
##[debug]Processed: ##vso[task.complete result=Failed;]webpack failed
##[error]Error: "toString()" failed
##[debug]Processed: ##vso[task.issue type=error;]Error: "toString()" failed
Error: "toString()" failed
at Buffer.toString (buffer.js:495:11)
at spawnSync (child_process.js:443:43)
at Object.execSync (child_process.js:507:13)
at Object.executeWebpackCli [as default] (C:\agent\_work\_tasks\webpack_6752a610-c2f3-11e6-949e-5d3841f133f1\4.2.0\webpackCompiler\WebpackCliExecutor.js:23:28)
at Object.compile (C:\agent\_work\_tasks\webpack_6752a610-c2f3-11e6-949e-5d3841f133f1\4.2.0\webpackCompiler\WebpackCompiler.js:37:46)
at C:\agent\_work\_tasks\webpack_6752a610-c2f3-11e6-949e-5d3841f133f1\4.2.0\index.js:43:46
at next (native)
at C:\agent\_work\_tasks\webpack_6752a610-c2f3-11e6-949e-5d3841f133f1\4.2.0\index.js:7:71
at __awaiter (C:\agent\_work\_tasks\webpack_6752a610-c2f3-11e6-949e-5d3841f133f1\4.2.0\index.js:3:12)
at run (C:\agent\_work\_tasks\webpack_6752a610-c2f3-11e6-949e-5d3841f133f1\4.2.0\index.js:15:12)我使用的是WebPack任务版本4。*
管道也是在运行npm安装之前,webpack。
发布于 2021-01-02 01:46:48
在你的日志中,问题在这里:
executing the command: node \node_modules\webpack\bin\webpack.js --json --config webpack.config.js它需要是:
executing the command: node /node_modules/webpack-cli/bin/cli.js --json --config webpack-config.js您可以在Advanced/webpack cli location下的webpack配置部分中更改命令路径
https://stackoverflow.com/questions/62915568
复制相似问题