简体   繁体   English

在 webpack 中 npm 构建失败

[英]npm build fails at webpack

I honestly dont even know what question I should be asking here, but npm run build fails老实说,我什至不知道我应该在这里问什么问题,但是 npm run build 失败了

> color-organizer@1.0.0 build /home/francis/Desktop/react/chapter-
06/color-organizer
> webpack --progress

module.js:471
    throw err;
    ^

Error: Cannot find module 'set-blocking'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/francis/.nvm/versions/node/v5.0.0/lib/node_modules/webpack/node_modules/yargs/lib/usage.js:5:21)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)

node -v gives me node -v 给我

v6.11.0

so its weird that i see 5 in this error log.所以我在这个错误日志中看到 5 很奇怪。 I do need to note that i was running on 5 before, and just recently upgraded to 6.11 in the middle of this problem我确实需要注意,我之前在 5 上运行,并且最近在此问题中升级到 6.11

i'm on ubuntu 16.04我在 ubuntu 16.04

i'm just trying to follow these examples https://github.com/MoonHighway/learning-react/ and start a server for 6, but i can't我只是想按照这些示例https://github.com/MoonHighway/learning-react/并为 6 人启动服务器,但我不能

and its pissing me off这让我很生气

Running npm install fixed the error for me using the latest versions.运行npm install使用最新版本为我修复了错误。 Otherwise you may try the command npm install set-blocking or npm install set-blocking --save-dev to only install the module as a developer dependency.否则,您可以尝试使用命令npm install set-blockingnpm install set-blocking --save-dev仅将模块安装为开发人员依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM