【问题标题】:On upgrading to angular 5.2 from 2.4 getting ng build error cannot find @progress/kendo-angular-dateinputs从 2.4 升级到 Angular 5.2 时出现 ng build 错误找不到 @progress/kendo-angular-dateinputs
【发布时间】:2018-06-22 00:54:05
【问题描述】:

我已经升级到 Angular 5.2 并安装了两次 npm 节点模块。在 ng build 之后,我收到错误,因为找不到模块'@progress/kendo-angu lar-dateinputs'

在安装了 @progress/kendo-angular-dateinputs 之后,我遇到了奇怪的错误。我没有像以前一样在任何地方使用过 kendo-angular-dateinputs 在更新之前我没有这个模块并且我的应用程序在升级之前工作正常。知道为什么会这样或如何解决吗?

ERROR in ./node_modules/@progress/kendo-angular-grid/dist/es/filtering/shared-filtering.module.js
Module not found: Error: Can't resolve '@progress/kendo-angular-inputs' in 'C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid
\dist\es\filtering'
resolve '@progress/kendo-angular-inputs' in 'C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid\dist\es\filtering'
  Parsed request is a module
  using description file: C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid\package.json (relative path: ./dist/es/filtering)

    Field 'browser' doesn't contain a valid alias configuration
  after using description file: C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid\package.json (relative path: ./dist/es/filt
ering)
    resolve as module
      C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid\dist\es\filtering\node_modules doesn't exist or is not a directory
      C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid\dist\es\node_modules doesn't exist or is not a directory
      C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid\dist\node_modules doesn't exist or is not a directory
      C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid\node_modules doesn't exist or is not a directory
      C:\Projects\copy of project for testing\node_modules\@progress\node_modules doesn't exist or is not a directory
      C:\Projects\copy of project for testing\node_modules\node_modules doesn't exist or is not a directory
      C:\Projects\node_modules doesn't exist or is not a directory
      C:\node_modules doesn't exist or is not a directory
      looking for modules in C:\Projects\copy of project for testing\node_modules
        using description file: C:\Projects\copy of project for testing\package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: C:\Projects\copy of project for testing\package.json (relative path: ./node_modules)
          using description file: C:\Projects\copy of project for testing\package.json (relative path: ./node_modules/@progress/kendo-angular-inputs)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs.js doesn't exist
            as directory
              C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs doesn't exist
      looking for modules in C:\Projects\copy of project for testing\node_modules
        using description file: C:\Projects\copy of project for testing\package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: C:\Projects\copy of project for testing\package.json (relative path: ./node_modules)
          using description file: C:\Projects\copy of project for testing\package.json (relative path: ./node_modules/@progress/kendo-angular-inputs)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs.js doesn't exist
            as directory
              C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs doesn't exist
      looking for modules in C:\Projects\copy of project for testing\src
        using description file: C:\Projects\copy of project for testing\package.json (relative path: ./src)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: C:\Projects\copy of project for testing\package.json (relative path: ./src)
          using description file: C:\Projects\copy of project for testing\package.json (relative path: ./src/@progress/kendo-angular-inputs)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs.js doesn't exist
            as directory
              C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs doesn't exist
      looking for modules in C:\Projects\copy of project for testing\src
        using description file: C:\Projects\copy of project for testing\package.json (relative path: ./src)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: C:\Projects\copy of project for testing\package.json (relative path: ./src)
          using description file: C:\Projects\copy of project for testing\package.json (relative path: ./src/@progress/kendo-angular-inputs)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs.js doesn't exist
            as directory
              C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs doesn't exist
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid\dist\es\filtering\node_modules]
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid\dist\es\node_modules]
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid\dist\node_modules]
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid\node_modules]
[C:\Projects\copy of project for testing\node_modules\@progress\node_modules]
[C:\Projects\copy of project for testing\node_modules\node_modules]
[C:\Projects\node_modules]
[C:\node_modules]
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs]
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs.ts]
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs.js]
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs]
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs]
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs.ts]
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs.js]
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs]
[C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs]
[C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs.ts]
[C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs.js]
[C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs]
[C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs]
[C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs.ts]
[C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs.js]
[C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs]
 @ ./node_modules/@progress/kendo-angular-grid/dist/es/filtering/shared-filtering.module.js 5:0-62
 @ ./node_modules/@progress/kendo-angular-grid/dist/es/filtering/cell/row-filtering.module.js
 @ ./node_modules/@progress/kendo-angular-grid/dist/es/main.js
 @ ./src/app/app.module.ts
 @ ./src/main.ts
 @ multi ./src/main.ts
ERROR in ./node_modules/@progress/kendo-angular-grid/dist/es/rendering/body.module.js
Module not found: Error: Can't resolve '@progress/kendo-angular-inputs' in 'C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid
\dist\es\rendering'
resolve '@progress/kendo-angular-inputs' in 'C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid\dist\es\rendering'
  Parsed request is a module
  using description file: C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid\package.json (relative path: ./dist/es/rendering)

    Field 'browser' doesn't contain a valid alias configuration
  after using description file: C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid\package.json (relative path: ./dist/es/rend
ering)
    resolve as module
      C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid\dist\es\rendering\node_modules doesn't exist or is not a directory
      C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid\dist\es\node_modules doesn't exist or is not a directory
      C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid\dist\node_modules doesn't exist or is not a directory
      C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid\node_modules doesn't exist or is not a directory
      C:\Projects\copy of project for testing\node_modules\@progress\node_modules doesn't exist or is not a directory
      C:\Projects\copy of project for testing\node_modules\node_modules doesn't exist or is not a directory
      C:\Projects\node_modules doesn't exist or is not a directory
      C:\node_modules doesn't exist or is not a directory
      looking for modules in C:\Projects\copy of project for testing\node_modules
        using description file: C:\Projects\copy of project for testing\package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: C:\Projects\copy of project for testing\package.json (relative path: ./node_modules)
          using description file: C:\Projects\copy of project for testing\package.json (relative path: ./node_modules/@progress/kendo-angular-inputs)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs.js doesn't exist
            as directory
              C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs doesn't exist
      looking for modules in C:\Projects\copy of project for testing\node_modules
        using description file: C:\Projects\copy of project for testing\package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: C:\Projects\copy of project for testing\package.json (relative path: ./node_modules)
          using description file: C:\Projects\copy of project for testing\package.json (relative path: ./node_modules/@progress/kendo-angular-inputs)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs.js doesn't exist
            as directory
              C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs doesn't exist
      looking for modules in C:\Projects\copy of project for testing\src
        using description file: C:\Projects\copy of project for testing\package.json (relative path: ./src)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: C:\Projects\copy of project for testing\package.json (relative path: ./src)
          using description file: C:\Projects\copy of project for testing\package.json (relative path: ./src/@progress/kendo-angular-inputs)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs.js doesn't exist
            as directory
              C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs doesn't exist
      looking for modules in C:\Projects\copy of project for testing\src
        using description file: C:\Projects\copy of project for testing\package.json (relative path: ./src)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: C:\Projects\copy of project for testing\package.json (relative path: ./src)
          using description file: C:\Projects\copy of project for testing\package.json (relative path: ./src/@progress/kendo-angular-inputs)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs.js doesn't exist
            as directory
              C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs doesn't exist
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid\dist\es\rendering\node_modules]
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid\dist\es\node_modules]
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid\dist\node_modules]
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-grid\node_modules]
[C:\Projects\copy of project for testing\node_modules\@progress\node_modules]
[C:\Projects\copy of project for testing\node_modules\node_modules]
[C:\Projects\node_modules]
[C:\node_modules]
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs]
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs.ts]
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs.js]
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs]
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs]
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs.ts]
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs.js]
[C:\Projects\copy of project for testing\node_modules\@progress\kendo-angular-inputs]
[C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs]
[C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs.ts]
[C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs.js]
[C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs]
[C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs]
[C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs.ts]
[C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs.js]
[C:\Projects\copy of project for testing\src\@progress\kendo-angular-inputs]
 @ ./node_modules/@progress/kendo-angular-grid/dist/es/rendering/body.module.js 19:0-70
 @ ./node_modules/@progress/kendo-angular-grid/dist/es/main.js
 @ ./src/app/app.module.ts
 @ ./src/main.ts
 @ multi ./src/main.ts

【问题讨论】:

    标签: angular npm node-modules angular5 kendo-ui-angular2


    【解决方案1】:

    我从https://www.npmjs.com/package/@progress/kendo-angular-dateinputs 下载了@progress/kendo-angular-dateinputs 最新版本并删除了 npm 节点模块。然后通过 npm i 重新安装了一个新的节点模块,并且在 ng build 摆脱了这个长期怪异的错误之后。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-18
      • 2020-01-14
      • 2018-10-25
      • 1970-01-01
      • 1970-01-01
      • 2019-02-06
      • 2019-10-26
      相关资源
      最近更新 更多