Cannot read property 'newLine' of undefined

angularjs报错:

ERROR in ./src/main.ts

Module build failed: TypeError: Cannot read property 'newLine' of undefined
    at Object.getNewLineCharacter (E:\web\myNg\ng2\node_modules\typescript\lib\typescript.js:9514:20)
    at Object.createCompilerHost (E:\web\myNg\ng2\node_modules\typescript\lib\typescript.js:63770:26)
    at Object.ngcLoader (E:\web\myNg\ng2\node_modules\.1.3.0@@ngtools\webpack\src\loader.js:380:33)
 @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts


ERROR in ./src/polyfills.ts
Module build failed: TypeError: Cannot read property 'newLine' of undefined
    at Object.getNewLineCharacter (E:\web\myNg\ng2\node_modules\typescript\lib\typescript.js:9514:20)
    at Object.createCompilerHost (E:\web\myNg\ng2\node_modules\typescript\lib\typescript.js:63770:26)
    at Object.ngcLoader (E:\web\myNg\ng2\node_modules\.1.3.0@@ngtools\webpack\src\loader.js:380:33)
 @ multi ./src/polyfills.ts

webpack: Failed to compile.


只是改动了一下版本号,然后就跑不起来了。

于是乎直接把node_modules文件夹删除,再一次npm install一下。

就可以了。感觉像是包里面冲突了。

你可能感兴趣的:(angularJS)