NativeScript-';生成失败,错误代码为2';

NativeScript-';生成失败,错误代码为2';,nativescript,nativescript-angular,Nativescript,Nativescript Angular,我的NativeScript Angular项目(我在该项目上工作了一段时间)大约在一周前停止编译,错误消息是Build failed,错误代码为2。 但是,在另一台机器上,项目可以正常编译! 在我使用的两台计算机上 NativeScript Sidekick,最新版本:1.19.1-v2019.8.1.2 NativeScript CLI版本:6.0.3 CLI扩展nativescript云版本:1.18.1 CLI扩展nativescript初学者工具包版本:0.3.5 我重新安装了node

我的NativeScript Angular项目(我在该项目上工作了一段时间)大约在一周前停止编译,错误消息是
Build failed,错误代码为2
。 但是,在另一台机器上,项目可以正常编译! 在我使用的两台计算机上

NativeScript Sidekick,最新版本:1.19.1-v2019.8.1.2

NativeScript CLI版本:6.0.3

CLI扩展nativescript云版本:1.18.1

CLI扩展nativescript初学者工具包版本:0.3.5

我重新安装了node、tns和Sidekick,删除了云缓存,创建了新的Telerik帐户,以避免在云上缓存任何东西

[19-08-19 10:18:56.133] Error detected during LiveSync on 709dacd534f7bbb357482d696468f8efbd5888ac for C:\Users\USR\Documents\NATIVESCRIPT\proj. Error: Build failed. Reason is: 'Build failed with error code 2'. Additional information: [00:00:27.138] [WARN]  Executing webpack failed with exit code 2.
[00:00:27.522] [ERROR] Executing webpack failed with exit code 2.
'Build failed with error code 2'.
[19-08-19 10:20:26.189] Error detected during LiveSync on D67LLNGU7HY96HVO for C:\Users\USR\Documents\NATIVESCRIPT\proj. Error: Build failed. Reason is: 'Build failed with error code 2'. Additional information: [00:00:17.670] [WARN]  Executing webpack failed with exit code 2.
[00:00:17.730] [ERROR] Module not found: Error: Can't resolve './info.component.css' in '/mnt/storage/builds/_/0065576d41c5e3acbcdc3ba31c41167f50faec72/6.0.3/6.0.0/proj/src/app/info'
[00:00:17.730] [ERROR] Module not found: Error: Can't resolve './specs1.component.css' in '/mnt/storage/builds/_/0065576d41c5e3acbcdc3ba31c41167f50faec72/6.0.3/6.0.0/proj/src/app/specs/specs1'
[00:00:17.731] [ERROR] Module not found: Error: Can't resolve './specs2.component.css' in '/mnt/storage/builds/_/0065576d41c5e3acbcdc3ba31c41167f50faec72/6.0.3/6.0.0/proj/src/app/specs/specs2'
[00:00:17.731] [ERROR] Module not found: Error: Can't resolve './lzs.component.css' in '/mnt/storage/builds/_/0065576d41c5e3acbcdc3ba31c41167f50faec72/6.0.3/6.0.0/proj/src/app/info/lzs'
[00:00:17.731] [ERROR] Module not found: Error: Can't resolve './specs.component.css' in '/mnt/storage/builds/_/0065576d41c5e3acbcdc3ba31c41167f50faec72/6.0.3/6.0.0/proj/src/app/specs'
[00:00:17.731] [ERROR] Module not found: Error: Can't resolve './aboutus.component.css' in '/mnt/storage/builds/_/0065576d41c5e3acbcdc3ba31c41167f50faec72/6.0.3/6.0.0/proj/src/app/aboutus'
[00:00:17.731] [ERROR] Module not found: Error: Can't resolve './pdk.component.css' in '/mnt/storage/builds/_/0065576d41c5e3acbcdc3ba31c41167f50faec72/6.0.3/6.0.0/proj/src/app/info/pdk'
[00:00:17.731] [ERROR] Module not found: Error: Can't resolve './tips1.component.css' in '/mnt/storage/builds/_/0065576d41c5e3acbcdc3ba31c41167f50faec72/6.0.3/6.0.0/proj/src/app/tips/tips1'
[00:00:17.731] [ERROR] Module not found: Error: Can't resolve './tips2.component.css' in '/mnt/storage/builds/_/0065576d41c5e3acbcdc3ba31c41167f50faec72/6.0.3/6.0.0/proj/src/app/tips/tips2'
[00:00:17.734] [ERROR] Module not found: Error: Can't resolve './stuff.component.css' in '/mnt/storage/builds/_/0065576d41c5e3acbcdc3ba31c41167f50faec72/6.0.3/6.0.0/proj/src/app/info/stuff'
[00:00:17.996] [ERROR] Executing webpack failed with exit code 2.
'Build failed with error code 2'.
我同时为iOS和Android构建

编辑:

[19-08-21 08:56:25.214]已开始生成。
[19-08-21 08:56:26.279](CLI)正在准备项目。。。
[19-08-21 08:56:26.286](CLI)项目已成功准备(ios)
[19-08-21 08:56:26.835](CLI)正在启动云构建。云操作id:8367422f-bdae-4aef-bb0c-a4ff5dcb94a8
[19-08-21 08:56:26.840](CLI)正在获取帐户信息。。。
[19-08-21 08:56:27.785](CLI)使用帐户79475b26e9fe4bf1952e3298ce5c9214。
[19-08-21 08:56:27.785](CLI)C:\Users\usr\Documents\ns\acmeapp的云构建,平台:“iOS”,配置:“Debug”。
[19-08-21 08:56:28.784]上传步骤已开始。
[19-08-21 08:56:29.383](CLI)无法使用git,原因是:
[19-08-21 08:56:29.383](CLI)未找到Git安装。安装Git以提高云构建的速度。
[19-08-21 08:56:37.691]上传步骤已完成。
[19-08-21 08:56:39.237]已开始生成步骤。
[19-08-21 08:56:44.398](CLI)ios构建工具版本2019.08.07.1r
[19-08-21 08:56:44.398](CLI)生成工具主机名administrators-mac-14.local
[19-08-21 08:56:44.398](CLI)解压缩项目文件
[19-08-21 08:56:44.398](CLI)NativeScript CLI版本6.0.3
[19-08-21 08:56:44.398](CLI)使用运行时版本6.0.1添加平台ios
[19-08-21 08:56:47.360](CLI)正在复制模板文件。。。
[19-08-21 08:56:50.375](CLI)已成功添加平台ios。v6.0.1
[19-08-21 08:56:50.375](CLI)为平台准备项目-ios
[19-08-21 08:57:20.477](CLI)正在准备项目。。。
[19-08-21 08:57:33.894](CLI)散列:7b2f90d5b50178cb7f9d
[19-08-21 08:57:33.894](CLI)版本:网页4.27.1
[19-08-21 08:57:33.894](CLI)时间:10055ms
[19-08-21 08:57:33.894](CLI)建造时间:2019年8月20日11:57:40
[19-08-21 08:57:33.894](CLI)资产大小块块块名称
[19-08-21 08:57:33.894](CLI)bundle.js 61.8 KiB bundle[已发出]bundle
[19-08-21 08:57:33.894](CLI)字体/fontsawesome.ttf 162 KiB[已发出]
[19-08-21 08:57:33.894](CLI)package.json 81字节[已发出]
[19-08-21 08:57:33.894](CLI)runtime.js 71.4 KiB runtime[emissed]runtime
[19-08-21 08:57:33.894](CLI)tns_模块/tns核心模块/inspector_模块.js 643字节tns_模块/tns核心模块/inspector_模块[发出]tns_模块/tns核心模块/inspector_模块
[19-08-21 08:57:33.894](CLI)vendor.js 3.84 MiB vendor[emissed]vendor
[19-08-21 08:57:33.894](CLI)入口点bundle=runtime.js vendor.js bundle.js
[19-08-21 08:57:33.894](CLI)入口点tns_模块/tns核心模块/inspector_模块=runtime.js vendor.js tns_模块/tns核心模块/inspector_模块.js
[19-08-21 08:57:33.894](CLI)[/app.scss]19.8kib{bundle}[builded]
[19-08-21 08:57:33.894](CLI)[./main.ts]926字节{bundle}[builded]
[19-08-21 08:57:33.894](CLI)[./package.json]73字节{bundle}{tns_模块/tns核心模块/inspector_模块}[可选][构建]
[19-08-21 08:57:33.894](CLI)+173个隐藏模块
[19-08-21 08:57:33.894](CLI)src/app/foobar/bar foobar/bar foobar.component.ts中出现错误(63,25):错误TS2339:类型“Observable”上不存在属性“ios”。
[19-08-21 08:57:33.894](CLI)src/app/foobar/bar foobar/bar foobar.component.ts(65,25):错误TS2339:类型“Observable”上不存在属性“android”。
[19-08-21 08:57:33.894](CLI)src/app/foobar/bar foobar/bar foobar.component.ts(67,25):错误TS2339:类型“Observable”上不存在属性“android”。
[19-08-21 08:57:33.894](CLI)src/app/foobar/bar foobar/bar foobar.component.ts(67118):错误TS2304:找不到名称“android”。
[19-08-21 08:57:33.894](CLI)网页包编译完成。
[19-08-21 08:57:33.894](CLI)执行网页包失败,退出代码为2。
[19-08-21 08:57:33.894](CLI)#准备
[19-08-21 08:57:33.894](CLI)描述
[19-08-21 08:57:33.894](CLI)启动网页包编译并准备应用程序的app_资源和插件平台目录。输出在平台目录中选定目标平台的子目录中生成。这允许您为所选平台构建项目。必须指定要为其准备项目的目标平台。
[19-08-21 08:57:33.894](CLI)运行此命令时,默认情况下不启用HMR(热模块更换)。如果要启用HMR,可以传递--HMR标志。
[19-08-21 08:57:33.894](CLI)命令
[19-08-21 08:57:33.894](CLI)┌─────────┬──────────────────────────┐
[19-08-21 08:57:33.894](CLI)│ 用法│ 提要│
[19-08-21 08:57:33.894](CLI)│ 一般的│ $ tns准备│
[19-08-21 08:57:33.894](CLI)└─────────┴──────────────────────────┘
[19-08-21 08:57:33.894](CLI)###
[19-08-21 08:56:25.214] Build started.
[19-08-21 08:56:26.279] (CLI) Preparing project...
[19-08-21 08:56:26.286] (CLI) Project successfully prepared (ios)
[19-08-21 08:56:26.835] (CLI) Starting Cloud build. Cloud operation id: 8367422f-bdae-4aef-bb0c-a4ff5dcb94a8
[19-08-21 08:56:26.840] (CLI) Getting accounts information...
[19-08-21 08:56:27.785] (CLI) Using account 79475b26e9fe4bf1952e3298ce5c9214.
[19-08-21 08:56:27.785] (CLI) Cloud build of 'C:\Users\usr\Documents\ns\acmeapp', platform: 'iOS', configuration: 'Debug'.
[19-08-21 08:56:28.784] Upload step started.
[19-08-21 08:56:29.383] (CLI) Unable to use git, reason is:
[19-08-21 08:56:29.383] (CLI) Git Installation Not Found. Install Git to improve the speed of cloud builds.
[19-08-21 08:56:37.691] Upload step completed.
[19-08-21 08:56:39.237] Build step started.
[19-08-21 08:56:44.398] (CLI) ios Build Tooling revision 2019.08.07.1r
[19-08-21 08:56:44.398] (CLI) Build Tooling Hostname administrators-mac-14.local
[19-08-21 08:56:44.398] (CLI) Unzip Project Files
[19-08-21 08:56:44.398] (CLI) NativeScript CLI version 6.0.3
[19-08-21 08:56:44.398] (CLI) Add platform ios with runtime version 6.0.1
[19-08-21 08:56:47.360] (CLI) Copying template files...
[19-08-21 08:56:50.375] (CLI) Platform ios successfully added. v6.0.1
[19-08-21 08:56:50.375] (CLI) Prepare Project for Platform -  ios
[19-08-21 08:57:20.477] (CLI) Preparing project...
[19-08-21 08:57:33.894] (CLI) Hash: 7b2f90d5b50178cb7f9d
[19-08-21 08:57:33.894] (CLI) Version: webpack 4.27.1
[19-08-21 08:57:33.894] (CLI) Time: 10055ms
[19-08-21 08:57:33.894] (CLI) Built at: 08/20/2019 11:57:40 PM
[19-08-21 08:57:33.894] (CLI)                                             Asset       Size                                          Chunks             Chunk Names
[19-08-21 08:57:33.894] (CLI)                                         bundle.js   61.8 KiB                                          bundle  [emitted]  bundle
[19-08-21 08:57:33.894] (CLI)                             fonts/FontAwesome.ttf    162 KiB                                                  [emitted]
[19-08-21 08:57:33.894] (CLI)                                      package.json   81 bytes                                                  [emitted]
[19-08-21 08:57:33.894] (CLI)                                        runtime.js   71.4 KiB                                         runtime  [emitted]  runtime
[19-08-21 08:57:33.894] (CLI) tns_modules/tns-core-modules/inspector_modules.js  643 bytes  tns_modules/tns-core-modules/inspector_modules  [emitted]  tns_modules/tns-core-modules/inspector_modules
[19-08-21 08:57:33.894] (CLI)                                         vendor.js   3.84 MiB                                          vendor  [emitted]  vendor
[19-08-21 08:57:33.894] (CLI) Entrypoint bundle = runtime.js vendor.js bundle.js
[19-08-21 08:57:33.894] (CLI) Entrypoint tns_modules/tns-core-modules/inspector_modules = runtime.js vendor.js tns_modules/tns-core-modules/inspector_modules.js
[19-08-21 08:57:33.894] (CLI) [./app.scss] 19.8 KiB {bundle} [built]
[19-08-21 08:57:33.894] (CLI) [./main.ts] 926 bytes {bundle} [built]
[19-08-21 08:57:33.894] (CLI) [./package.json] 73 bytes {bundle} {tns_modules/tns-core-modules/inspector_modules} [optional] [built]
[19-08-21 08:57:33.894] (CLI)     + 173 hidden modules
[19-08-21 08:57:33.894] (CLI) ERROR in src/app/foobar/bar-foobar/bar-foobar.component.ts(63,25): error TS2339: Property 'ios' does not exist on type 'Observable'.
[19-08-21 08:57:33.894] (CLI) src/app/foobar/bar-foobar/bar-foobar.component.ts(65,25): error TS2339: Property 'android' does not exist on type 'Observable'.
[19-08-21 08:57:33.894] (CLI) src/app/foobar/bar-foobar/bar-foobar.component.ts(67,25): error TS2339: Property 'android' does not exist on type 'Observable'.
[19-08-21 08:57:33.894] (CLI) src/app/foobar/bar-foobar/bar-foobar.component.ts(67,118): error TS2304: Cannot find name 'android'.
[19-08-21 08:57:33.894] (CLI) Webpack compilation complete.
[19-08-21 08:57:33.894] (CLI) Executing webpack failed with exit code 2.
[19-08-21 08:57:33.894] (CLI) # tns prepare
[19-08-21 08:57:33.894] (CLI) ### Description
[19-08-21 08:57:33.894] (CLI) Starts a Webpack compilation and prepares the app's App_Resources and the plugins platforms directories. The output is generated in a subdirectory for the selected target platform in the platforms directory. This lets you build the project for the selected platform. You must specify the target platform for which you want to prepare your project.
[19-08-21 08:57:33.894] (CLI) When running this command the HMR (Hot Module Replacement) is not enabled by default. In case you want to enable HMR, you can pass --hmr flag.
[19-08-21 08:57:33.894] (CLI) ### Commands
[19-08-21 08:57:33.894] (CLI) ┌─────────┬──────────────────────────┐
[19-08-21 08:57:33.894] (CLI) │ Usage   │ Synopsis                 │
[19-08-21 08:57:33.894] (CLI) │ General │ $ tns prepare <Platform> │
[19-08-21 08:57:33.894] (CLI) └─────────┴──────────────────────────┘
[19-08-21 08:57:33.894] (CLI) ### Arguments
[19-08-21 08:57:33.894] (CLI) <Platform> is the target mobile platform for which you want to prepare your project. You can set the following target platforms.
[19-08-21 08:57:33.894] (CLI)     * android - Prepares your project for an Android build.
[19-08-21 08:57:33.894] (CLI)     * ios - Prepares your project for an iOS build.
[19-08-21 08:57:33.894] (CLI) ### Options
[19-08-21 08:57:33.894] (CLI)     * --hmr - Enables the hot module replacement (HMR) feature.
[19-08-21 08:57:33.894] (CLI)     * --force - If set, skips the application compatibility checks and forces npm i to ensure all dependencies are installed. Otherwise, the command will check the application compatibility with the current CLI version and could fail requiring tns migrate.
[19-08-21 08:57:35.416] (CLI) Executing webpack failed with exit code 2.
[19-08-21 08:57:43.483] Build step completed.
[19-08-21 08:57:43.489] (CLI) Unable to apply changes on device: 709dacd534f7bbb357482d696468f8efbd5888ac. Error is: Build failed. Reason is: 'Build failed with error code 2'. Additional information: [00:00:49.725] [WARN]  Executing webpack failed with exit code 2.
[19-08-21 08:57:43.489] (CLI) [00:00:51.335] [ERROR] Executing webpack failed with exit code 2.
[19-08-21 08:57:43.489] (CLI) 'Build failed with error code 2'..
[19-08-21 08:57:43.494] Error detected during LiveSync on 709dacd534f7bbb357482d696468f8efbd5888ac for C:\Users\usr\Documents\ns\acmeapp. Error: Build failed. Reason is: 'Build failed with error code 2'. Additional information: [00:00:49.725] [WARN]  Executing webpack failed with exit code 2.
[00:00:51.335] [ERROR] Executing webpack failed with exit code 2.
'Build failed with error code 2'.
[19-08-21 08:57:43.501] Stopped LiveSync on 709dacd534f7bbb357482d696468f8efbd5888ac for C:\Users\usr\Documents\ns\acmeapp.