为了账号安全,请及时绑定邮箱和手机立即绑定

angular4 build报错

fs.js:640

  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);

                 ^


Error: ENOENT: no such file or directory, open 'E:\angularjs\angular4\node_modules\_@angular_platform-browser@4.3.6@@angular\package.json'

    at Error (native)

    at Object.fs.openSync (fs.js:640:18)

    at Object.fs.readFileSync (fs.js:508:33)

    at licensePlugin.readPackageJson (E:\angularjs\angular4\node_modules\_license-webpack-plugin@0.5.1@license-webpack-plugin\index.js:26:19)

    at licensePlugin.getModuleInfo (E:\angularjs\angular4\node_modules\_license-webpack-plugin@0.5.1@license-webpack-plugin\index.js:30:28)

    at licensePlugin.<anonymous> (E:\angularjs\angular4\node_modules\_license-webpack-plugin@0.5.1@license-webpack-plugin\index.js:81:31)

    at Array.filter (native)

    at licensePlugin.writeModuleInfo (E:\angularjs\angular4\node_modules\_license-webpack-plugin@0.5.1@license-webpack-plugin\index.js:77:8)

    at licensePlugin.gatherModuleInfo (E:\angularjs\angular4\node_modules\_license-webpack-plugin@0.5.1@license-webpack-plugin\index.js:117:10)

    at licensePlugin.<anonymous> (E:\angularjs\angular4\node_modules\_license-webpack-plugin@0.5.1@license-webpack-plugin\index.js:233:12)

    at Compiler.applyPlugins (E:\angularjs\angular4\node_modules\_tapable@0.2.8@tapable\lib\Tapable.js:61:14)

    at emitRecords.err (E:\angularjs\angular4\node_modules\_webpack@3.4.1@webpack\lib\Compiler.js:268:11)

    at Compiler.emitRecords (E:\angularjs\angular4\node_modules\_webpack@3.4.1@webpack\lib\Compiler.js:375:38)

    at emitAssets.err (E:\angularjs\angular4\node_modules\_webpack@3.4.1@webpack\lib\Compiler.js:262:10)

    at applyPluginsAsyncSeries1.err (E:\angularjs\angular4\node_modules\_webpack@3.4.1@webpack\lib\Compiler.js:368:12)

    at next (E:\angularjs\angular4\node_modules\_tapable@0.2.8@tapable\lib\Tapable.js:218:11)


正在回答

2 回答

你用cnpm装的吧

0 回复 有任何疑惑可以回复我~
#1

aleoyu 提问者

是的。那有什么方法可以改这个错误呢?
2017-08-29 回复 有任何疑惑可以回复我~
#2

Erik_Song

这种问题很常见,两种解决方案: 1.修改ng 的版本,再次安装 2.卸载后用npm安装一次
2017-08-29 回复 有任何疑惑可以回复我~

你好,我这边是用npm安装的 1.7.3的cli请问一下build的时候还是会报错

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

angular4 build报错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信