Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Linux] 执行 npm run compile 报错 #29

Open
keleyundou opened this issue Mar 23, 2018 · 1 comment
Open

[Linux] 执行 npm run compile 报错 #29

keleyundou opened this issue Mar 23, 2018 · 1 comment

Comments

@keleyundou
Copy link

keleyundou commented Mar 23, 2018

> node build/scripts/compile

module.js:545
    throw err;
    ^

Error: Cannot find module 'fs-extra'
    at Function.Module._resolveFilename (module.js:543:15)
    at Function.Module._load (module.js:470:25)
    at Module.require (module.js:593:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/colabean/Desktop/workspace/flow-web/build/scripts/compile.js:1:74)
    at Module._compile (module.js:649:30)
    at Object.Module._extensions..js (module.js:660:10)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:501:12)
    at Function.Module._load (module.js:493:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! flow-web@0.0.1 compile: `node build/scripts/compile`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the flow-web@0.0.1 compile script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

手动执行 npm install fs-extra 还是不行

相关环境:

1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'compile' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'precompile', 'compile', 'postcompile' ]

@xueerfei
Copy link

xueerfei commented Jul 9, 2018

我也遇到同样的问题,

  1. rm -rf /node_modules
  2. npm install fs-extra -S //不要全局安装

这样就可以编译过了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants