Skip to content

web project with nativescript-schematics@latest and angular@next cannot run on device #257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
endarova opened this issue Oct 3, 2019 · 3 comments

Comments

@endarova
Copy link
Contributor

endarova commented Oct 3, 2019

Environment
"dependencies": {
"nativescript-angular": "~8.0.1",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.12",
"tns-core-modules": "~6.0.0",
"@angular/animations": "~9.0.0-next.8",
"@angular/common": "~9.0.0-next.8",
"@angular/compiler": "~9.0.0-next.8",
"@angular/core": "~9.0.0-next.8",
"@angular/forms": "~9.0.0-next.8",
"@angular/platform-browser": "~9.0.0-next.8",
"@angular/platform-browser-dynamic": "~9.0.0-next.8",
"@angular/router": "~9.0.0-next.8",
"rxjs": "~6.5.3",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"nativescript-dev-webpack": "~1.0.0",
"@nativescript/schematics": "0.7.2-2019-10-03-133555-07",
"@nativescript/tslint-rules": "~0.0.2",
"@angular-devkit/build-angular": "~0.900.0-next.6",
"@angular/cli": "~9.0.0-next.6",
"@angular/compiler-cli": "~9.0.0-next.8",
"@angular/language-service": "~9.0.0-next.8",
"@types/jasmine": "~3.4.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "^5.1.2",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.2.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.0",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"protractor": "~5.4.2",
"ts-node": "~8.3.0",
"tslint": "~5.18.0",
"typescript": "~3.5.3"
},
"nativescript": {
"id": "org.nativescript.ngsample",
"tns-android": {
"version": "6.1.2"
}
}
}

Describe the bug
Web project with added nativescript@schematics cannot run on device. It crashes with error:

System.err: An uncaught Exception occurred on "main" thread.
System.err: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function
System.err: TypeError: platform_browser_1.ɵsetRootDomAdapter is not a function
System.err: File: (file:///node_modules/nativescript-angular/dom-adapter.js:12:0)
System.err:
System.err: StackTrace:
System.err: push.../node_modules/nativescript-angular/dom-adapter.js.NativeScriptDomAdapter.makeCurrent(file:///node_modules/nativescript-angular/dom-adapter.js:12:0)
System.err: at ../node_modules/nativescript-angular/dom-adapter.js(file:///node_modules/nativescript-angular/dom-adapter.js:153:0)
System.err: at webpack_require(file:///src/webpack/bootstrap:753:0)
System.err: at fn(file:///src/webpack/bootstrap:120:0)
System.err: at (file:///node_modules/nativescript-angular/platform-common.js:10:0)
System.err: at ../node_modules/nativescript-angular/platform-common.js(file:///data/data/org.nativescript.ngsample/files/app/vendor.js:78459:30)
System.err: at webpack_require(file:///src/webpack/bootstrap:753:0)
System.err: at fn(file:///src/webpack/bootstrap:120:0)
System.err: at (file:///node_modules/nativescript-angular/platform.js:6:24)
System.err: at ../node_modules/nativescript-angular/platform.js(file:///data/data/org.nativescript.ngsample/files/app/vendor.js:78582:30)
System.err: at webpack_require(file:///src/webpack/bootstrap:753:0)
System.err: at fn(file:///src/webpack/bootstrap:120:0)
System.err: at (file:///data/data/org.nativescript.ngsample/files/app/bundle.js:220:87)
System.err: at ./main.tns.ts(file:///data/data/org.nativescript.ngsample/files/app/bundle.js:292:30)
System.err: at webpack_require(file:///src/webpack/bootstrap:753:0)
System.err: at checkDeferredModules(file:///src/webpack/bootstrap:43:0)
System.err: at webpackJsonpCallback(file:///src/webpack/bootstrap:30:0)
System.err: at (file:///data/data/org.nativescript.ngsample/files/app/bundle.js:2:57)
System.err: at require(:1:266)
System.err:
System.err:
System.err: TypeError: platform_browser_1.ɵsetRootDomAdapter is not a function

To Reproduce

  1. npm i angular/cli-builds -g
  2. ng new m1 --skip-install
  3. npm i @nativescript/schematics@ -g
  4. ng add @nativescript/schematics
  5. tns run android

Expected behavior
Project to deploy and run on device

@endarova endarova changed the title web project with nativeScript-schematics@latest and angular@next cannot run on device web project with nativescript-schematics@latest and angular@next cannot run on device Oct 3, 2019
@Sothecom
Copy link

Hello, Hope everyone is well. Anything new on this?

@thientm
Copy link

thientm commented Jul 23, 2020

same problem, feel stuck at hello world schematics from nativescript :(

@thientm
Copy link

thientm commented Jul 31, 2020

follow lastest guide , it will help from freshstart project
#288

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants