【问题标题】:build error came after update node modules更新节点模块后出现构建错误
【发布时间】:2018-05-22 07:43:03
【问题描述】:

Error on fetch for node_modules/angular2-notifications/src/simple-notifications.module.js at file:///D:/GIP/IMAGE PILOT/gipfe/node_modules/angular2-notifications/src/simple-notifications.module.js Loading build/tmp/aot/src/app/app.module.ngfactory.js Loading build\boot-aot.js Error: ENOENT: no such file or directory, open 'D:\GIP\IMAGE PILOT\gipfe\node_modules\angular2-notifications\src\simple-notifications.module.js' [10:13:51] 'build.aot' errored after 52 s [10:13:51] Error in plugin 'run-sequence(bundle-aot)' Message: Error on fetch for node_modules/angular2-notifications/src/simple-notifications.module.js at file:///D:/GIP/IMAGE PILOT/gipfe/node_modules/angular2-notifications/src/simple-notifications.module.js Loading build/tmp/aot/src/app/app.module.ngfactory.js Loading build\boot-aot.js ENOENT: no such file or directory, open 'D:\GIP\IMAGE PILOT\gipfe\node_modules\angular2-notifications\src\simple-notifications.module.js' Details: originalErr: Error: ENOENT: no such file or directory, open 'D:\GIP\IMAGE PILOT\gipfe\node_modules\angular2-notifications\src\simple-notifications.module.js' Stack: Error on fetch for node_modules/angular2-notifications/src/simple-notifications.module.js at file:///D:/GIP/IMAGE PILOT/gipfe/node_modules/angular2-notifications/src/simple-notifications.module.js Loading build/tmp/aot/src/app/app.module.ngfactory.js Loading build\boot-aot.js Error: ENOENT: no such file or directory, open 'D:\GIP\IMAGE PILOT\gipfe\node_modules\angular2-notifications\src\simple-notifications.module.js'

import { SimpleNotificationsModule }                from 'angular2-notifications';
 imports: [
    SharedModule,
    routing,
    ToastModule.forRoot(),
    SimpleNotificationsModule.forRoot(),

当我使用 build npm run build.aot 命令时出现此构建错误。我把 npm install 命令放在我的项目中然后我尝试采取构建错误来了。

请帮我解决这个问题

谢谢。

【问题讨论】:

    标签: javascript node.js angular npm build


    【解决方案1】:

    在我安装 typescript 之前的版本

    "typescript": "^2.3.3" // package.json
    

    然后我更改了打字稿版本

    "typescript": "2.3.3" //without cap symbol
    

    现在,没有出现错误,我成功构建了

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-09-09
      • 1970-01-01
      • 2019-08-28
      • 2018-08-16
      • 2018-04-20
      • 1970-01-01
      • 2018-04-04
      相关资源
      最近更新 更多