为什么在“create-react-app”之后使用yarn install会出现这些错误?

时间:2016-11-23 21:12:23

标签: create-react-app

我创建了一个新文件夹,然后运行了“create-react-app”。 (这是在Windows 10中。) 然后我从另一个文件夹复制了一个package.json文件,该文件夹的运行代码是几周前用“create-react-app”创建的。然后我运行“yarn install”来更新新应用程序,其中包含复制旧应用程序所需的所有node_modules。为什么我会在控制台显示屏中看到如下所示的许多错误?

注意:我无法显示完整的未格式化显示是否收到,因为stackoverflow不允许我发布它。所以这里有几行格式化。

ERR! stack     at emitTwo (events.js:106:13)\nnode-pre-gyp 
ERR! stack     at ChildProcess.emit (events.js:191:7)\nnode-pre-gyp 
ERR! stack     at maybeClose (internal/child_process.js:877:16)\nnode-pre-gyp
ERR! build error \nnode-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\\Users\\Bruce\\Dropbox\\Projects BlueDuck\\Blue-Duck-Beta-Test\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64\\fse.node --module_name=fse --module_path=C:\\Users\\Bruce\\Dropbox\\Projects BlueDuck\\Blue-Duck-Beta-Test\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64' (1)\nnode-pre-gyp
ERR! stack     at ChildProcess.<anonymous> (C:\\Users\\Bruce\\Dropbox\\Projects BlueDuck\\Blue-Duck-Beta-Test\\node_modules\\fsevents\\node_modules\\node-pre-gyp\\lib\\util\\compile.js:83:29)\nnode-pre-gyp

1 个答案:

答案 0 :(得分:0)

你在运行什么版本的npm?如果它是5+,请尝试:

npm i -g npm@4

来自this thread