我刚买了一台带M1芯片的新mac电脑,我想知道这个错误是否与此有关,因为在我的旧电脑上,我没有问题。
[webpack-cli] Error: spawn Unknown system error -86
at ChildProcess.spawn (node:internal/child_process:412:11)
at spawn (node:child_process:698:9)
at Object.execFile (node:child_process:325:17)
at Object.module.exports.fileCommandJson (/Users/mlc/Sites/ImapImport/node_modules/node-notifier/lib/utils.js:88:13)
at NotificationCenter.notifyRaw (/Users/mlc/Sites/ImapImport/node_modules/node-notifier/notifiers/notificationcenter.js:81:11)
at WebpackNotifierPlugin.compilationDone (/Users/mlc/Sites/ImapImport/node_modules/webpack-notifier/index.js:129:14)
at Hook.eval [as callAsync] (eval at create (/Users/mlc/Sites/ImapImport/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:18:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/mlc/Sites/ImapImport/node_modules/tapable/lib/Hook.js:18:14)
at /Users/mlc/Sites/ImapImport/node_modules/webpack/lib/Compiler.js:498:23
at Compiler.emitRecords (/Users/mlc/Sites/ImapImport/node_modules/webpack/lib/Compiler.js:906:5) {
errno: -86,
code: 'Unknown system error -86',
syscall: 'spawn'
}当命令启动时发生:
npm run dev或
yarn encore dev我已经尝试过删除node_modules文件以及Packy-lock.json,并清除npm缓存,然后重新运行npm,但是没有工作。
建议?
发布于 2022-02-04 23:07:55
今天,我得到了我的新M1专业以及我有同样的问题。有趣的是,npm run prod正确地创建了所有文件。
首先,我检查了是否安装了xcode-select --install --是的。
接下来,我检查了已安装的git版本git --version -> git version 2.32.0 (Apple Git-132),标准的Apple。我通过自制brew install git安装了一个新的git,并重新启动了我的Mac。在那之后,错误消失了。
如果这不能修复您的错误,可能是一个奇怪的npm包。
发布于 2022-02-06 12:00:09
问题解决了,这要归功于@andreasm为我指明了正确的方向。在使用以下命令安装xcode之后,我解释了自己的情况:
xcode-select -p今天,我只是出于好奇,执行了以下命令,所以我并没有比这更多的关注:
xcode-select --install错误已经消失,道德:不要相信第一条命令。
https://stackoverflow.com/questions/70987542
复制相似问题