Skip to content

ng new -c=@nativescript/schematics project-name --shared #284

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

Closed
akashthakur05 opened this issue Jul 6, 2020 · 3 comments
Closed

ng new -c=@nativescript/schematics project-name --shared #284

akashthakur05 opened this issue Jul 6, 2020 · 3 comments

Comments

@akashthakur05
Copy link

Environment
{
"name": "dtr-app",
"nativescript": {
"id": "org.nativescript.dtrapp"
},
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"android": "tns run android --env.aot",
"ios": "tns run ios --env.aot",
"mobile": "tns run",
"preview": "tns preview"
},
"private": true,
"dependencies": {
"@angular/animations": "~9.1.0",
"@angular/common": "~9.1.0",
"@angular/compiler": "~9.1.0",
"@angular/core": "~9.1.0",
"@angular/forms": "~9.1.0",
"@angular/platform-browser": "~9.1.0",
"@angular/platform-browser-dynamic": "~9.1.0",
"@angular/router": "~9.1.0",
"core-js": "^2.6.9",
"@nativescript/angular": "~9.0.0",
"@nativescript/core": "~6.5.5",
"@nativescript/theme": "~2.2.1",
"reflect-metadata": "~0.1.12",
"rxjs": "~6.5.5",
"tslib": "1.10.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular/cli": "~9.1.0",
"@angular/compiler-cli": "~9.1.0",
"@angular-devkit/build-angular": "~0.901.0",
"@nativescript/tslint-rules": "~0.0.5",
"@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
"codelyzer": "^5.1.2",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.4.1",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.0",
"karma-jasmine": "~3.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"nativescript-dev-webpack": "~1.5.0",
"protractor": "~5.4.3",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~3.8.3"
}
}

Describe the bug
After Creating The Project using ng new -c=@nativescript/schematics project-name --shared i tried to run the ios device
I used the Command tns run ios --bundle and it broke !! With The Error
Screenshot 2020-07-06 at 12 53 03 PM

To Reproduce
tns run ios --bundle

Expected behavior
It Should Start The Ios In Emulator

Sample project
https://github.com/akashthakur05/navtive-app

@MFFoX
Copy link

MFFoX commented Jul 16, 2020

See this answer to get around this issue.

TL;DR it's generating a webpack config with the old constructor parameter structure but is requesting a newer version of that plugin that requires a new structure and it not backwards compatible.

@thientm
Copy link

thientm commented Jul 22, 2020

See this answer to get around this issue.

TL;DR it's generating a webpack config with the old constructor parameter structure but is requesting a newer version of that plugin that requires a new structure and it not backwards compatible.

after i follow this, tns preview work, but app crash show log error like this

`SyntaxError: Unexpected identifier
File: (file:///data/data/org.nativescript.preview/files/app/bundle.js:34:144)

StackTrace:
require(:1:266)

SyntaxError: Unexpected identifier
at com.tns.Runtime.runModule(Native Method)
at com.tns.Runtime.runModule(Runtime.java:674)
at com.tns.Runtime.run(Runtime.java:666)
at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1190)
at android.app.ActivityThread.handleMakeApplication(ActivityThread.java:7145)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7095)
at android.app.ActivityThread.access$1700(ActivityThread.java:273)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2105)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:8125)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)`

@NathanWalker
Copy link
Contributor

Fixed in latest release, please see here for instructions of use.

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

4 participants