Nativescript Stuck at Copying template files

99封情书 提交于 2019-12-24 05:59:39

问题


I have a NativeScript + angular project it was working fine until i upgraded my cli to 7.0.3 now i can't run the following :

tns run android --bundle

because it get stuck at :

Webpack compilation complete. Watching for file changes.
Webpack build done!
Copying template files...

I've tried to wait more than an hour all it created was platform folder with android and temp-android and not the complete project it use to generate

my environment is currently like this when i run ng --version from cmd i get :

Angular CLI: 6.1.0-beta.0
Node: 8.12.0
OS: win32 x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.7.0-beta.0
@angular-devkit/core         0.7.0-beta.0
@angular-devkit/schematics   0.7.0-beta.0
@schematics/angular          0.7.0-beta.0
@schematics/update           0.7.0-beta.0
rxjs                         6.3.3
typescript                   2.7.2

when i run the same command from powershell i get this :

Angular CLI: 7.0.3
Node: 8.12.0
OS: win32 x64
Angular: 6.1.10
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.10.3
@angular-devkit/build-angular     0.10.3
@angular-devkit/build-optimizer   0.10.3
@angular-devkit/build-webpack     0.10.3
@angular-devkit/core              7.0.3
@angular-devkit/schematics        7.0.3
@angular/cli                      7.0.3
@angular/language-service         7.0.1
@ngtools/webpack                  7.0.3
@schematics/angular               7.0.3
@schematics/update                0.10.3
rxjs                              6.3.3
typescript                        2.7.2
webpack                           4.19.1

every thing got missed up , i need a way to fix the current or rollback to the previous status .

from my search i thing the problem is related to npm , is there a way to clear cash or remove the the package and reinstall them with right versions .

UPDATE

after leaving the command for 2 hours i got this error

Unable to apply changes on device: CB5A28949S. Error is: request to https://registry.npmjs.org/tns-android failed, reason: connect ECONNREFUSED 127.0.0.1:59069.
Executing after-watch hook from D:\IdeaProjects\AndroidAppsLauncher\hooks\after-watch\nativescript-dev-webpack.js
Stopping webpack watch
Executing after-watch hook from D:\IdeaProjects\AndroidAppsLauncher\hooks\after-watch\nativescript-dev-webpack.js

Noting that i'm not using a proxy

UPDATE

regarding last update , apperenlty tns had a proxy i removed it tns proxy clear but the copying files issue still exists

UPDATE

It worked !!! , I changed nothing , I only kept creating new projects and trying to run then suddenly it build and copied the files in 2 secs ! I feel like it was trying to connecting to back end interface that was down for that time which i think is really inconvenient, there should be an offline mode.

来源:https://stackoverflow.com/questions/53135881/nativescript-stuck-at-copying-template-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!