Angular中的tns-core-modules突然模块解决错误

时间:2019-10-03 04:04:05

标签: angular nativescript angular2-nativescript

摆弄我的本机脚本一段时间后,当我尝试编译我的角度构建时,导致了一系列巨大的编译错误。 (运行ng serve --open)。

ERROR in ./node_modules/tns-core-modules/ui/tab-navigation-base/tab-strip/tab-strip.js
Module not found: Error: Can't resolve '../../../color' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\ui\tab-navigation-base\tab-strip'
ERROR in ./node_modules/tns-core-modules/ui/builder/component-builder/component-builder.js
Module not found: Error: Can't resolve '../../../platform' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\ui\builder\component-builder'
ERROR in ./node_modules/tns-core-modules/ui/tab-navigation-base/tab-strip-item/tab-strip-item.js
Module not found: Error: Can't resolve '../../../platform' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\ui\tab-navigation-base\tab-strip-item'
ERROR in ./node_modules/tns-core-modules/globals/polyfills/timers/timers.js
Module not found: Error: Can't resolve '../../../timer' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\globals\polyfills\timers'
ERROR in ./node_modules/tns-core-modules/globals/polyfills/dialogs/dialogs.js
Module not found: Error: Can't resolve '../../../ui/dialogs' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\globals\polyfills\dialogs'
ERROR in ./node_modules/tns-core-modules/ui/core/bindable/bindable.js
Module not found: Error: Can't resolve '../../../utils/utils' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\ui\core\bindable'
ERROR in ./node_modules/tns-core-modules/ui/tab-navigation-base/tab-strip/tab-strip.js
Module not found: Error: Can't resolve '../../core/view' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\ui\tab-navigation-base\tab-strip'
ERROR in ./node_modules/tns-core-modules/ui/tab-navigation-base/tab-strip-item/tab-strip-item.js
Module not found: Error: Can't resolve '../../core/view' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\ui\tab-navigation-base\tab-strip-item'
ERROR in ./node_modules/tns-core-modules/ui/tab-navigation-base/tab-strip-item/tab-strip-item.js
Module not found: Error: Can't resolve '../../image/image' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\ui\tab-navigation-base\tab-strip-item'
ERROR in ./node_modules/tns-core-modules/ui/tab-navigation-base/tab-strip-item/tab-strip-item.js
Module not found: Error: Can't resolve '../../label/label' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\ui\tab-navigation-base\tab-strip-item'
ERROR in ./node_modules/tns-core-modules/ui/builder/builder.js
Module not found: Error: Can't resolve '../../platform' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\ui\builder'
ERROR in ./node_modules/tns-core-modules/ui/tab-navigation-base/tab-strip-item/tab-strip-item.js
Module not found: Error: Can't resolve '../../tabs' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\ui\tab-navigation-base\tab-strip-item'
ERROR in ./node_modules/tns-core-modules/ui/tab-navigation-base/tab-strip/tab-strip.js
Module not found: Error: Can't resolve '../../text-base' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\ui\tab-navigation-base\tab-strip'
ERROR in ./node_modules/tns-core-modules/ui/enums/enums.js
Module not found: Error: Can't resolve '../animation' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\ui\enums'
ERROR in ./node_modules/tns-core-modules/ui/content-view/content-view.js
Module not found: Error: Can't resolve '../core/view' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\ui\content-view'
ERROR in ./node_modules/tns-core-modules/ui/placeholder/placeholder.js
Module not found: Error: Can't resolve '../core/view' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\ui\placeholder'
ERROR in ./node_modules/tns-core-modules/ui/repeater/repeater.js
Module not found: Error: Can't resolve '../label' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\ui\repeater'
ERROR in ./node_modules/tns-core-modules/ui/proxy-view-container/proxy-view-container.js
Module not found: Error: Can't resolve '../layouts/layout-base' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\ui\proxy-view-container'
ERROR in ./node_modules/tns-core-modules/ui/repeater/repeater.js
Module not found: Error: Can't resolve '../layouts/layout-base' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\ui\repeater'
ERROR in ./node_modules/tns-core-modules/ui/repeater/repeater.js
Module not found: Error: Can't resolve '../layouts/stack-layout' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\ui\repeater'
ERROR in ./node_modules/tns-core-modules/file-system/file-system.js
Module not found: Error: Can't resolve '../platform' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\file-system'
ERROR in ./node_modules/tns-core-modules/utils/debug.js
Module not found: Error: Can't resolve '../platform' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\utils'
ERROR in ./node_modules/tns-core-modules/module-name-resolver/module-name-resolver.js
Module not found: Error: Can't resolve '../platform/platform' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\module-name-resolver'
ERROR in ./node_modules/tns-core-modules/text/span.js
Module not found: Error: Can't resolve '../ui/core/view' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\text'
ERROR in ./node_modules/tns-core-modules/text/formatted-string.js
Module not found: Error: Can't resolve '../ui/core/view' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\text'
ERROR in ./node_modules/tns-core-modules/file-system/file-system.js
Module not found: Error: Can't resolve './file-system-access' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\file-system'
ERROR in ./node_modules/tns-core-modules/http/http.js
Module not found: Error: Can't resolve './http-request' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\http'
ERROR in ./node_modules/reduce-css-calc/dist/parser.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\reduce-css-calc\dist'
ERROR in ./node_modules/tns-core-modules/js-libs/polymer-expressions/polymer-expressions.js
Module not found: Error: Can't resolve 'js-libs/esprima' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\js-libs\polymer-expressions'
ERROR in ./node_modules/tns-core-modules/js-libs/polymer-expressions/polymer-expressions.js
Module not found: Error: Can't resolve 'js-libs/polymer-expressions/path-parser' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\js-libs\polymer-expressions'
ERROR in ./node_modules/nativescript-angular/platform-providers.js
Module not found: Error: Can't resolve 'tns-core-modules/platform' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/view-util.js
Module not found: Error: Can't resolve 'tns-core-modules/platform' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/directives/platform-filters.js
Module not found: Error: Can't resolve 'tns-core-modules/platform' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular\directives'
ERROR in ./node_modules/nativescript-angular/directives/action-bar.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/action-bar' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular\directives'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/activity-indicator' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/bottom-navigation' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/button' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/view-util.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/core/view' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/core/view' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/date-picker' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/platform-providers.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/frame' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/frame' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/directives/dialogs.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/frame' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular\directives'
ERROR in ./node_modules/nativescript-angular/router/page-router-outlet.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/frame' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular\router'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/html-view' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/image' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/label' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/layouts/absolute-layout' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/layouts/dock-layout' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/layouts/flexbox-layout' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/layouts/grid-layout' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/app-host-view.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/layouts/grid-layout' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/view-util.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/layouts/layout-base' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/layouts/layout-base' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/directives/templated-items-comp.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/layouts/layout-base' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular\directives'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/layouts/stack-layout' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/layouts/wrap-layout' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/list-picker' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/list-view' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/platform-providers.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/page' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/page' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/directives/action-bar.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/page' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular\directives'
ERROR in ./node_modules/nativescript-angular/router/page-router-outlet.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/page' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular\router'
ERROR in ./node_modules/nativescript-angular/router/ns-empty-outlet.component.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/page' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular\router'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/progress' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/scroll-view' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/search-bar' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/segmented-bar' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/slider' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/switch' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/tab-navigation-base/tab-content-item' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/tab-view' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/directives/tab-view.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/tab-view' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular\directives'2m
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/tabs' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/text-field' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/text-view' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/time-picker' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/web-view' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\nativescript-angular'
ERROR in ./node_modules/tns-core-modules/fetch/fetch.js
Module not found: Error: Can't resolve 'xhr' in 'C:\Users\Ace\eclipse-workspace\arenamaster\node_modules\tns-core-modules\fetch'

我尝试运行npm i nativescript-angular。它对这些错误没有任何影响。

所有错误均在tns-core-modules中寻找,并且大多数错误与nativescript-angular有关。我尝试过重新安装这两种程序,但是对编译错误都没有任何影响。

1 个答案:

答案 0 :(得分:0)

打开文件src/app/auto-generated/auto-generated.component.ts

您需要删除router:RouterExtensions和导入文件RouterExtensions