angular4 build报错

来源:-

aleoyu

2017-08-24 18:05

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回答

  • Erik_Song
    2017-08-29 12:38:33

    你用cnpm装的吧

    Erik_S...

    这种问题很常见,两种解决方案: 1.修改ng 的版本,再次安装 2.卸载后用npm安装一次

    2017-08-29 14:07:09

    共 2 条回复 >

  • 恒无际涯
    2018-03-09 15:21:38

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

Angular-cli基础

介绍Angular CLI命令使用,通过Angular CLI构建一个简单的Angular2的应用

25216 学习 · 52 问题

查看课程

相似问题