-
-
Notifications
You must be signed in to change notification settings - Fork 241
Description
Environment
Provide version numbers for the following components (information can be retrieved by running tns info
in your project folder or by inspecting the package.json
of the project):
- CLI: 7.1.1
- Cross-platform modules: ios, preview (android not setup yet, but will later)
- Android Runtime: not installed
- iOS Runtime: "@nativescript/ios": "7.1.0"
- Plugin(s): none (base install)
- NativeScript-Angular: "@nativescript/angular": "~10.1.0"
- Angular: 9.1.2
Describe the bug
I am setting up on my angular project for code sharing for the first time by following the migration instructions from the website. It is just error after error. Running tns doctor shows a successfully installation.
No issues were detected.
✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ Your adb from the Android SDK is correctly installed.
✔ The Android SDK is installed.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Xcode is installed and is configured properly.
✔ xcodeproj is installed and is configured properly.
✔ CocoaPods are installed.
✔ CocoaPods update is not required.
✔ CocoaPods are configured properly.
✔ Your current CocoaPods version is newer than 1.0.0.
✔ Python installed and configured correctly.
✔ The Python 'six' package is found.
✔ Xcode version 12.3.0 satisfies minimum required version 10.
✔ Getting NativeScript components versions information...
✔ Component nativescript has 7.1.1 version and is up to date.
⚠ Update available for component @nativescript/core. Your current version is 7.0.13 and the latest available version is 7.1.0.
✔ Component @nativescript/ios has 7.1.0 version and is up to date.
✖ Component @nativescript/android is not installed.
running tns preview or tns run ios results in either a NGCC failed error as showed below:
Error: NGCC failed.
at NgccProcessor.process (/Users/patrickpolomsky/Projects/ProdLogic/ProdCoreNg/node_modules/@ngtools/webpack/src/ngcc_processor.js:129:19)
at /Users/patrickpolomsky/Projects/ProdLogic/ProdCoreNg/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:593:31
at SyncHook.eval [as call] (eval at create (/Users/patrickpolomsky/Projects/ProdLogic/ProdCoreNg/node_modules/tapable/lib/HookCodeFactory.js:19:10), :9:1)
at SyncHook.lazyCompileHook (/Users/patrickpolomsky/Projects/ProdLogic/ProdCoreNg/node_modules/tapable/lib/Hook.js:154:20)
at webpack (/Users/patrickpolomsky/Projects/ProdLogic/ProdCoreNg/node_modules/webpack/lib/webpack.js:55:30)
at processOptions (/Users/patrickpolomsky/Projects/ProdLogic/ProdCoreNg/node_modules/webpack-cli/bin/cli.js:272:16)
at /Users/patrickpolomsky/Projects/ProdLogic/ProdCoreNg/node_modules/webpack-cli/bin/cli.js:364:3
at Object.parse (/Users/patrickpolomsky/Projects/ProdLogic/ProdCoreNg/node_modules/webpack-cli/node_modules/yargs/yargs.js:576:18)
at /Users/patrickpolomsky/Projects/ProdLogic/ProdCoreNg/node_modules/webpack-cli/bin/cli.js:49:8
at Object. (/Users/patrickpolomsky/Projects/ProdLogic/ProdCoreNg/node_modules/webpack-cli/bin/cli.js:366:3)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (/Users/patrickpolomsky/Projects/ProdLogic/ProdCoreNg/node_modules/webpack/bin/webpack.js:156:2)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47
Executing webpack failed with exit code 1.
I can prevent the NGCC error by using
"angularCompilerOptions": {
"enableIvy": false
},
However, the results in this error
ERROR in Error during template compile of 'AppRoutingModule'
Function calls are not supported in decorators but 'NativeScriptRouterModule' was called.
Unexpected value 'undefined' imported by the module 'AppRoutingModule in /Users/patrickpolomsky/Projects/ProdLogic/ProdCoreNg/src/app/app-routing.module.tns.ts'
Can't export value NativeScriptRouterModule in /Users/patrickpolomsky/Projects/ProdLogic/ProdCoreNg/node_modules/@nativescript/angular/nativescript-angular.d.ts from AppRoutingModule in /Users/patrickpolomsky/Projects/ProdLogic/ProdCoreNg/src/app/app-routing.module.tns.ts as it was neither declared nor imported!
Error during template compile of 'AppRoutingModule'
Function calls are not supported in decorators but 'NativeScriptRouterModule' was called.
JS ERROR Error: Main entry is missing. App cannot be started. Verify app bootstrap.
I am literary just trying to get started. What am I doing wrong? I will back all this out if someone can guide me on how to get this setup and working. Thank you.