NativeScript + Angular: Code Sharing Project
up vote
2
down vote
favorite
I followed the Nativescript steps for creating a new code sharing project here and I would like to use sass. I tried both for ones that have the NatievScript theme as well as the one that does not:
ng new -c=@nativescript/schematics no-theme-project --shared --no-theme
or
ng new -c=@nativescript/schematics sass-no-theme-project --shared --style=scss --no-theme
For this Post I chose No Theme. When it finishes creating a new project the folder is as shown:
Inside Desktop/TestProjects/sass-no-theme-project
I install the node modules:
npm install
When running ng serve --o
the application builds and loads up as expected in the browser. For NativeScript mobile however for Android (have not tested iOS yet) the application crashes with an error. I have tried both tns run android
as well as using the NativeScript SideKick to build however they end up with the same results. I have also tried local and cloud builds.
Device Used:
Physical Samsung A5: Not emulator
Error On Mobile Device In Logs:
An uncaught Exception occurred on "main" thread.
java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Application entry point file not found. Please specify the file in package.json otherwise make sure the file index.js or bootstrap.js exists.nIf using typescript make sure your entry point file is transpiled to javascript.
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6065)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by: com.tns.NativeScriptException: Application entry point file not found. Please specify the file in package.json otherwise make sure the file index.js or bootstrap.js exists.nIf using typescript make sure your entry point file is transpiled to javascript.
at com.tns.Module.bootstrapApp(Module.java:311)
at com.tns.Runtime.run(Runtime.java:544)
at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1125)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6062)
... 8 more
Caused by: com.tns.NativeScriptException: Failed to find module: "./", relative to: app//
at com.tns.Module.resolvePathHelper(Module.java:146)
at com.tns.Module.bootstrapApp(Module.java:309)
... 12 more
Logs In Command Line and NativeScript Client
[18-11-10 17:43:53.724] (CLI) [./main.ns.ts] 1.22 KiB {bundle} [built]
[18-11-10 17:43:53.724] (CLI) [./package.json] 123 bytes {bundle} [optional] [built]
[18-11-10 17:43:53.724] (CLI) + 403 hidden modules
[18-11-10 17:43:53.724] (CLI) ERROR in Patterns must be a string or an array of strings
[18-11-10 17:43:53.724] (CLI) Webpack compilation complete.
[18-11-10 17:43:53.724] (CLI) Executing webpack failed with exit code 2.
[18-11-10 17:43:53.724] (CLI) # tns build android
[18-11-10 17:43:53.724] (CLI) ### Description
[18-11-10 17:43:53.724] (CLI) clean-webpack-plugin: /mnt/storage/builds/_/1bfec9e7b462a1843535f909d892c70d2010e1cf/5.0.0/5.0.0/no-sass-project/platforms/android/app/src/main/assets/app/**/* has been removed.
[18-11-10 17:43:53.724] (CLI) Executing webpack failed with exit code 2.
[18-11-10 17:43:53.724] (CLI) bc_GgX4lpDXQFHYT4ydmJ
[18-11-10 17:43:56.917] (CLI) Unable to apply changes on device: 5210ffc964ca44f3. Error is: Build failed..
[18-11-10 17:43:56.920] Error detected during LiveSync on 5210ffc964ca44f3 for C:UsersuserNameDesktopno-sass-project. Error: Build failed.
[18-11-10 17:43:56.925] (CLI) Executing after-watch hook from C:UsersuserNameDesktopno-sass-projecthooksafter-watchnativescript-dev-sass.js
[18-11-10 17:43:56.925] (CLI) Executing after-watch hook from C:UsersuserNameDesktopno-sass-projecthooksafter-watchnativescript-dev-typescript.js
[18-11-10 17:43:56.925] (CLI) Executing after-watch hook from C:UsersuserNameDesktopno-sass-projecthooksafter-watchnativescript-dev-webpack.js
[18-11-10 17:43:56.925] (CLI) Stopping webpack watch
With Nativescript and Angular creating a blank new project for me I would assume it is suppose to be a HelloWorld project that works in Web, iOS, and Android right out of the gate.
UPDATE
I tried following the troubleshoot guide here such as reinstalling JDK 8
and that however the problem persists. I got it to run once, it failed and after about 4-10 minutes it rebuilt and was working. Since then I can not get it to work a second time. This leads to me believe there maybe a configuration issues somewhere such as the tsconfig
json
files. Taken a look in them and they seem to be fine.
angular typescript nativescript nativescript-codesharing nativescript-schematics
|
show 1 more comment
up vote
2
down vote
favorite
I followed the Nativescript steps for creating a new code sharing project here and I would like to use sass. I tried both for ones that have the NatievScript theme as well as the one that does not:
ng new -c=@nativescript/schematics no-theme-project --shared --no-theme
or
ng new -c=@nativescript/schematics sass-no-theme-project --shared --style=scss --no-theme
For this Post I chose No Theme. When it finishes creating a new project the folder is as shown:
Inside Desktop/TestProjects/sass-no-theme-project
I install the node modules:
npm install
When running ng serve --o
the application builds and loads up as expected in the browser. For NativeScript mobile however for Android (have not tested iOS yet) the application crashes with an error. I have tried both tns run android
as well as using the NativeScript SideKick to build however they end up with the same results. I have also tried local and cloud builds.
Device Used:
Physical Samsung A5: Not emulator
Error On Mobile Device In Logs:
An uncaught Exception occurred on "main" thread.
java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Application entry point file not found. Please specify the file in package.json otherwise make sure the file index.js or bootstrap.js exists.nIf using typescript make sure your entry point file is transpiled to javascript.
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6065)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by: com.tns.NativeScriptException: Application entry point file not found. Please specify the file in package.json otherwise make sure the file index.js or bootstrap.js exists.nIf using typescript make sure your entry point file is transpiled to javascript.
at com.tns.Module.bootstrapApp(Module.java:311)
at com.tns.Runtime.run(Runtime.java:544)
at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1125)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6062)
... 8 more
Caused by: com.tns.NativeScriptException: Failed to find module: "./", relative to: app//
at com.tns.Module.resolvePathHelper(Module.java:146)
at com.tns.Module.bootstrapApp(Module.java:309)
... 12 more
Logs In Command Line and NativeScript Client
[18-11-10 17:43:53.724] (CLI) [./main.ns.ts] 1.22 KiB {bundle} [built]
[18-11-10 17:43:53.724] (CLI) [./package.json] 123 bytes {bundle} [optional] [built]
[18-11-10 17:43:53.724] (CLI) + 403 hidden modules
[18-11-10 17:43:53.724] (CLI) ERROR in Patterns must be a string or an array of strings
[18-11-10 17:43:53.724] (CLI) Webpack compilation complete.
[18-11-10 17:43:53.724] (CLI) Executing webpack failed with exit code 2.
[18-11-10 17:43:53.724] (CLI) # tns build android
[18-11-10 17:43:53.724] (CLI) ### Description
[18-11-10 17:43:53.724] (CLI) clean-webpack-plugin: /mnt/storage/builds/_/1bfec9e7b462a1843535f909d892c70d2010e1cf/5.0.0/5.0.0/no-sass-project/platforms/android/app/src/main/assets/app/**/* has been removed.
[18-11-10 17:43:53.724] (CLI) Executing webpack failed with exit code 2.
[18-11-10 17:43:53.724] (CLI) bc_GgX4lpDXQFHYT4ydmJ
[18-11-10 17:43:56.917] (CLI) Unable to apply changes on device: 5210ffc964ca44f3. Error is: Build failed..
[18-11-10 17:43:56.920] Error detected during LiveSync on 5210ffc964ca44f3 for C:UsersuserNameDesktopno-sass-project. Error: Build failed.
[18-11-10 17:43:56.925] (CLI) Executing after-watch hook from C:UsersuserNameDesktopno-sass-projecthooksafter-watchnativescript-dev-sass.js
[18-11-10 17:43:56.925] (CLI) Executing after-watch hook from C:UsersuserNameDesktopno-sass-projecthooksafter-watchnativescript-dev-typescript.js
[18-11-10 17:43:56.925] (CLI) Executing after-watch hook from C:UsersuserNameDesktopno-sass-projecthooksafter-watchnativescript-dev-webpack.js
[18-11-10 17:43:56.925] (CLI) Stopping webpack watch
With Nativescript and Angular creating a blank new project for me I would assume it is suppose to be a HelloWorld project that works in Web, iOS, and Android right out of the gate.
UPDATE
I tried following the troubleshoot guide here such as reinstalling JDK 8
and that however the problem persists. I got it to run once, it failed and after about 4-10 minutes it rebuilt and was working. Since then I can not get it to work a second time. This leads to me believe there maybe a configuration issues somewhere such as the tsconfig
json
files. Taken a look in them and they seem to be fine.
angular typescript nativescript nativescript-codesharing nativescript-schematics
I have seen his happening when I don't injectmoduleId
in component decorator - (moduleId: module.id
)
– Manoj
Nov 7 at 20:02
I have the same problem. If I find something I'll let you know
– Jonas
Nov 7 at 21:11
Thanks, as will I. This should work out of the box for Android and iOS so seems strange
– L1ghtk3ira
Nov 7 at 21:37
Has anyone found a solution for this? I am not sure if this is an issue and the nativescript team is aware or not.
– L1ghtk3ira
Nov 10 at 22:53
1
New update it seems to be working now with tns run android --bundle. It failed at first and about 3 minutes later it closed and re-opened working. Not sure if the file was not converted to as a starting point so it starts with a crash and ends up rebuilding when its done.
– L1ghtk3ira
Nov 12 at 3:22
|
show 1 more comment
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I followed the Nativescript steps for creating a new code sharing project here and I would like to use sass. I tried both for ones that have the NatievScript theme as well as the one that does not:
ng new -c=@nativescript/schematics no-theme-project --shared --no-theme
or
ng new -c=@nativescript/schematics sass-no-theme-project --shared --style=scss --no-theme
For this Post I chose No Theme. When it finishes creating a new project the folder is as shown:
Inside Desktop/TestProjects/sass-no-theme-project
I install the node modules:
npm install
When running ng serve --o
the application builds and loads up as expected in the browser. For NativeScript mobile however for Android (have not tested iOS yet) the application crashes with an error. I have tried both tns run android
as well as using the NativeScript SideKick to build however they end up with the same results. I have also tried local and cloud builds.
Device Used:
Physical Samsung A5: Not emulator
Error On Mobile Device In Logs:
An uncaught Exception occurred on "main" thread.
java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Application entry point file not found. Please specify the file in package.json otherwise make sure the file index.js or bootstrap.js exists.nIf using typescript make sure your entry point file is transpiled to javascript.
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6065)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by: com.tns.NativeScriptException: Application entry point file not found. Please specify the file in package.json otherwise make sure the file index.js or bootstrap.js exists.nIf using typescript make sure your entry point file is transpiled to javascript.
at com.tns.Module.bootstrapApp(Module.java:311)
at com.tns.Runtime.run(Runtime.java:544)
at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1125)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6062)
... 8 more
Caused by: com.tns.NativeScriptException: Failed to find module: "./", relative to: app//
at com.tns.Module.resolvePathHelper(Module.java:146)
at com.tns.Module.bootstrapApp(Module.java:309)
... 12 more
Logs In Command Line and NativeScript Client
[18-11-10 17:43:53.724] (CLI) [./main.ns.ts] 1.22 KiB {bundle} [built]
[18-11-10 17:43:53.724] (CLI) [./package.json] 123 bytes {bundle} [optional] [built]
[18-11-10 17:43:53.724] (CLI) + 403 hidden modules
[18-11-10 17:43:53.724] (CLI) ERROR in Patterns must be a string or an array of strings
[18-11-10 17:43:53.724] (CLI) Webpack compilation complete.
[18-11-10 17:43:53.724] (CLI) Executing webpack failed with exit code 2.
[18-11-10 17:43:53.724] (CLI) # tns build android
[18-11-10 17:43:53.724] (CLI) ### Description
[18-11-10 17:43:53.724] (CLI) clean-webpack-plugin: /mnt/storage/builds/_/1bfec9e7b462a1843535f909d892c70d2010e1cf/5.0.0/5.0.0/no-sass-project/platforms/android/app/src/main/assets/app/**/* has been removed.
[18-11-10 17:43:53.724] (CLI) Executing webpack failed with exit code 2.
[18-11-10 17:43:53.724] (CLI) bc_GgX4lpDXQFHYT4ydmJ
[18-11-10 17:43:56.917] (CLI) Unable to apply changes on device: 5210ffc964ca44f3. Error is: Build failed..
[18-11-10 17:43:56.920] Error detected during LiveSync on 5210ffc964ca44f3 for C:UsersuserNameDesktopno-sass-project. Error: Build failed.
[18-11-10 17:43:56.925] (CLI) Executing after-watch hook from C:UsersuserNameDesktopno-sass-projecthooksafter-watchnativescript-dev-sass.js
[18-11-10 17:43:56.925] (CLI) Executing after-watch hook from C:UsersuserNameDesktopno-sass-projecthooksafter-watchnativescript-dev-typescript.js
[18-11-10 17:43:56.925] (CLI) Executing after-watch hook from C:UsersuserNameDesktopno-sass-projecthooksafter-watchnativescript-dev-webpack.js
[18-11-10 17:43:56.925] (CLI) Stopping webpack watch
With Nativescript and Angular creating a blank new project for me I would assume it is suppose to be a HelloWorld project that works in Web, iOS, and Android right out of the gate.
UPDATE
I tried following the troubleshoot guide here such as reinstalling JDK 8
and that however the problem persists. I got it to run once, it failed and after about 4-10 minutes it rebuilt and was working. Since then I can not get it to work a second time. This leads to me believe there maybe a configuration issues somewhere such as the tsconfig
json
files. Taken a look in them and they seem to be fine.
angular typescript nativescript nativescript-codesharing nativescript-schematics
I followed the Nativescript steps for creating a new code sharing project here and I would like to use sass. I tried both for ones that have the NatievScript theme as well as the one that does not:
ng new -c=@nativescript/schematics no-theme-project --shared --no-theme
or
ng new -c=@nativescript/schematics sass-no-theme-project --shared --style=scss --no-theme
For this Post I chose No Theme. When it finishes creating a new project the folder is as shown:
Inside Desktop/TestProjects/sass-no-theme-project
I install the node modules:
npm install
When running ng serve --o
the application builds and loads up as expected in the browser. For NativeScript mobile however for Android (have not tested iOS yet) the application crashes with an error. I have tried both tns run android
as well as using the NativeScript SideKick to build however they end up with the same results. I have also tried local and cloud builds.
Device Used:
Physical Samsung A5: Not emulator
Error On Mobile Device In Logs:
An uncaught Exception occurred on "main" thread.
java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Application entry point file not found. Please specify the file in package.json otherwise make sure the file index.js or bootstrap.js exists.nIf using typescript make sure your entry point file is transpiled to javascript.
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6065)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by: com.tns.NativeScriptException: Application entry point file not found. Please specify the file in package.json otherwise make sure the file index.js or bootstrap.js exists.nIf using typescript make sure your entry point file is transpiled to javascript.
at com.tns.Module.bootstrapApp(Module.java:311)
at com.tns.Runtime.run(Runtime.java:544)
at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1125)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6062)
... 8 more
Caused by: com.tns.NativeScriptException: Failed to find module: "./", relative to: app//
at com.tns.Module.resolvePathHelper(Module.java:146)
at com.tns.Module.bootstrapApp(Module.java:309)
... 12 more
Logs In Command Line and NativeScript Client
[18-11-10 17:43:53.724] (CLI) [./main.ns.ts] 1.22 KiB {bundle} [built]
[18-11-10 17:43:53.724] (CLI) [./package.json] 123 bytes {bundle} [optional] [built]
[18-11-10 17:43:53.724] (CLI) + 403 hidden modules
[18-11-10 17:43:53.724] (CLI) ERROR in Patterns must be a string or an array of strings
[18-11-10 17:43:53.724] (CLI) Webpack compilation complete.
[18-11-10 17:43:53.724] (CLI) Executing webpack failed with exit code 2.
[18-11-10 17:43:53.724] (CLI) # tns build android
[18-11-10 17:43:53.724] (CLI) ### Description
[18-11-10 17:43:53.724] (CLI) clean-webpack-plugin: /mnt/storage/builds/_/1bfec9e7b462a1843535f909d892c70d2010e1cf/5.0.0/5.0.0/no-sass-project/platforms/android/app/src/main/assets/app/**/* has been removed.
[18-11-10 17:43:53.724] (CLI) Executing webpack failed with exit code 2.
[18-11-10 17:43:53.724] (CLI) bc_GgX4lpDXQFHYT4ydmJ
[18-11-10 17:43:56.917] (CLI) Unable to apply changes on device: 5210ffc964ca44f3. Error is: Build failed..
[18-11-10 17:43:56.920] Error detected during LiveSync on 5210ffc964ca44f3 for C:UsersuserNameDesktopno-sass-project. Error: Build failed.
[18-11-10 17:43:56.925] (CLI) Executing after-watch hook from C:UsersuserNameDesktopno-sass-projecthooksafter-watchnativescript-dev-sass.js
[18-11-10 17:43:56.925] (CLI) Executing after-watch hook from C:UsersuserNameDesktopno-sass-projecthooksafter-watchnativescript-dev-typescript.js
[18-11-10 17:43:56.925] (CLI) Executing after-watch hook from C:UsersuserNameDesktopno-sass-projecthooksafter-watchnativescript-dev-webpack.js
[18-11-10 17:43:56.925] (CLI) Stopping webpack watch
With Nativescript and Angular creating a blank new project for me I would assume it is suppose to be a HelloWorld project that works in Web, iOS, and Android right out of the gate.
UPDATE
I tried following the troubleshoot guide here such as reinstalling JDK 8
and that however the problem persists. I got it to run once, it failed and after about 4-10 minutes it rebuilt and was working. Since then I can not get it to work a second time. This leads to me believe there maybe a configuration issues somewhere such as the tsconfig
json
files. Taken a look in them and they seem to be fine.
angular typescript nativescript nativescript-codesharing nativescript-schematics
angular typescript nativescript nativescript-codesharing nativescript-schematics
edited Nov 12 at 4:32
asked Nov 7 at 19:44
L1ghtk3ira
62021029
62021029
I have seen his happening when I don't injectmoduleId
in component decorator - (moduleId: module.id
)
– Manoj
Nov 7 at 20:02
I have the same problem. If I find something I'll let you know
– Jonas
Nov 7 at 21:11
Thanks, as will I. This should work out of the box for Android and iOS so seems strange
– L1ghtk3ira
Nov 7 at 21:37
Has anyone found a solution for this? I am not sure if this is an issue and the nativescript team is aware or not.
– L1ghtk3ira
Nov 10 at 22:53
1
New update it seems to be working now with tns run android --bundle. It failed at first and about 3 minutes later it closed and re-opened working. Not sure if the file was not converted to as a starting point so it starts with a crash and ends up rebuilding when its done.
– L1ghtk3ira
Nov 12 at 3:22
|
show 1 more comment
I have seen his happening when I don't injectmoduleId
in component decorator - (moduleId: module.id
)
– Manoj
Nov 7 at 20:02
I have the same problem. If I find something I'll let you know
– Jonas
Nov 7 at 21:11
Thanks, as will I. This should work out of the box for Android and iOS so seems strange
– L1ghtk3ira
Nov 7 at 21:37
Has anyone found a solution for this? I am not sure if this is an issue and the nativescript team is aware or not.
– L1ghtk3ira
Nov 10 at 22:53
1
New update it seems to be working now with tns run android --bundle. It failed at first and about 3 minutes later it closed and re-opened working. Not sure if the file was not converted to as a starting point so it starts with a crash and ends up rebuilding when its done.
– L1ghtk3ira
Nov 12 at 3:22
I have seen his happening when I don't inject
moduleId
in component decorator - (moduleId: module.id
)– Manoj
Nov 7 at 20:02
I have seen his happening when I don't inject
moduleId
in component decorator - (moduleId: module.id
)– Manoj
Nov 7 at 20:02
I have the same problem. If I find something I'll let you know
– Jonas
Nov 7 at 21:11
I have the same problem. If I find something I'll let you know
– Jonas
Nov 7 at 21:11
Thanks, as will I. This should work out of the box for Android and iOS so seems strange
– L1ghtk3ira
Nov 7 at 21:37
Thanks, as will I. This should work out of the box for Android and iOS so seems strange
– L1ghtk3ira
Nov 7 at 21:37
Has anyone found a solution for this? I am not sure if this is an issue and the nativescript team is aware or not.
– L1ghtk3ira
Nov 10 at 22:53
Has anyone found a solution for this? I am not sure if this is an issue and the nativescript team is aware or not.
– L1ghtk3ira
Nov 10 at 22:53
1
1
New update it seems to be working now with tns run android --bundle. It failed at first and about 3 minutes later it closed and re-opened working. Not sure if the file was not converted to as a starting point so it starts with a crash and ends up rebuilding when its done.
– L1ghtk3ira
Nov 12 at 3:22
New update it seems to be working now with tns run android --bundle. It failed at first and about 3 minutes later it closed and re-opened working. Not sure if the file was not converted to as a starting point so it starts with a crash and ends up rebuilding when its done.
– L1ghtk3ira
Nov 12 at 3:22
|
show 1 more comment
2 Answers
2
active
oldest
votes
up vote
0
down vote
When you build code-sharing projects you should use the --bundle
flag.
So your command should be:
tns run android --bundle
or tns run ios --bundle
If you keep forgetting the --bundle
flag, then you could use the scripts provided in package.json and run:
npm run android
or npm run ios
Additionally, if your project uses TypeScript 2.7, then you might need to update it to 2.8
As a side note: you don't need moduleId
in code-sharing projects, as webpack is taking care of this for you.
Hello Seba Wita, I do run the command tns run android --bundle. Maybe something is wrong on my pc. I will try again from a new pc from scratch and let you know.
– L1ghtk3ira
Nov 12 at 14:11
Also I did try before using the Nativescript Sidekick origionally. Not sure if that would cause an issue.
– L1ghtk3ira
Nov 12 at 14:13
We are going to release a new version of the @nativescript/schematics tomorrow, which should include an update for angular 7. It should also resolve an issue with the TypeScript version.
– Seba Wita
Nov 12 at 14:44
You believe is may be why the build is crashing? I did create a github ticket here if it helps: github.com/NativeScript/NativeScript/issues/6552. Thanks for the sturdy replies
– L1ghtk3ira
Nov 12 at 15:23
add a comment |
up vote
0
down vote
accepted
It seems it may be difficult for the nativescript team as the packages it relies on keep changing rapidly. This is the package.json setup I used thanks @NickIliev from the nativescript team, @skopekreep, and good old debugging. If you use this setup you should be fine.
Just be wary updating the packages in the future and test before committing your package.json.
As well as the main packages I would suggest you be careful updating and ensure you test:
typescript
@types/jasmine
nativescript-dev-webpack
tns-core-modules
{
"name": "myproject",
"nativescript": {
"id": "org.nativescript.myproject",
"tns-android": {
"version": "5.0.0"
}
},
"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 --bundle",
"ios": "tns run ios --bundle"
},
"private": true,
"dependencies": {
"@angular/animations": "~6.1.0",
"@angular/common": "~6.1.0",
"@angular/compiler": "~6.1.0",
"@angular/core": "~6.1.0",
"@angular/forms": "~6.1.0",
"@angular/http": "~6.1.0",
"@angular/platform-browser": "~6.1.0",
"@angular/platform-browser-dynamic": "~6.1.0",
"@angular/router": "~6.1.0",
"core-js": "^2.5.4",
"nativescript-angular": "~6.1.0",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.8",
"rxjs": "^6.0.0",
"tns-core-modules": "~5.0.2",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.8.0",
"@angular/cli": "^6.2.0",
"@angular/compiler-cli": "^7.0.3",
"@nativescript/schematics": "~0.4.0",
"@types/jasmine": "2.8.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "~4.2.1",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.0",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"nativescript-dev-sass": "~1.6.0",
"nativescript-dev-typescript": "~0.7.0",
"nativescript-dev-webpack": "^0.17.0",
"protractor": "~5.3.0",
"ts-node": "~5.0.1",
"tslint": "~5.9.1",
"typescript": "^3.1.6"
}
}
Steps:
1. Install latest version of Node JS
Install latest version of NPM
npm i -g @angular/cli
npm i -g @nativescript/schematics
Go into the folder and Replace the package.json, ensure to change name and id to your projects name
npm install
tns run android --bundle
I have issues System.err: android.content.res.Resources$NotFoundException: Resource ID #0xfffffff6 after using your package json
– Pedro Teran
Nov 14 at 16:44
Have you made other changes before that? If you follow this guide for a code sharing project: docs.nativescript.org/angular/code-sharing/… and then use my package.json before you use npm install it should be fine.
– L1ghtk3ira
Nov 14 at 18:10
I added some steps for you to follow. Ensure you have xcode or android installed with SDKs. Or have your ios or Android device connected.
– L1ghtk3ira
Nov 14 at 18:15
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53196685%2fnativescript-angular-code-sharing-project%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
When you build code-sharing projects you should use the --bundle
flag.
So your command should be:
tns run android --bundle
or tns run ios --bundle
If you keep forgetting the --bundle
flag, then you could use the scripts provided in package.json and run:
npm run android
or npm run ios
Additionally, if your project uses TypeScript 2.7, then you might need to update it to 2.8
As a side note: you don't need moduleId
in code-sharing projects, as webpack is taking care of this for you.
Hello Seba Wita, I do run the command tns run android --bundle. Maybe something is wrong on my pc. I will try again from a new pc from scratch and let you know.
– L1ghtk3ira
Nov 12 at 14:11
Also I did try before using the Nativescript Sidekick origionally. Not sure if that would cause an issue.
– L1ghtk3ira
Nov 12 at 14:13
We are going to release a new version of the @nativescript/schematics tomorrow, which should include an update for angular 7. It should also resolve an issue with the TypeScript version.
– Seba Wita
Nov 12 at 14:44
You believe is may be why the build is crashing? I did create a github ticket here if it helps: github.com/NativeScript/NativeScript/issues/6552. Thanks for the sturdy replies
– L1ghtk3ira
Nov 12 at 15:23
add a comment |
up vote
0
down vote
When you build code-sharing projects you should use the --bundle
flag.
So your command should be:
tns run android --bundle
or tns run ios --bundle
If you keep forgetting the --bundle
flag, then you could use the scripts provided in package.json and run:
npm run android
or npm run ios
Additionally, if your project uses TypeScript 2.7, then you might need to update it to 2.8
As a side note: you don't need moduleId
in code-sharing projects, as webpack is taking care of this for you.
Hello Seba Wita, I do run the command tns run android --bundle. Maybe something is wrong on my pc. I will try again from a new pc from scratch and let you know.
– L1ghtk3ira
Nov 12 at 14:11
Also I did try before using the Nativescript Sidekick origionally. Not sure if that would cause an issue.
– L1ghtk3ira
Nov 12 at 14:13
We are going to release a new version of the @nativescript/schematics tomorrow, which should include an update for angular 7. It should also resolve an issue with the TypeScript version.
– Seba Wita
Nov 12 at 14:44
You believe is may be why the build is crashing? I did create a github ticket here if it helps: github.com/NativeScript/NativeScript/issues/6552. Thanks for the sturdy replies
– L1ghtk3ira
Nov 12 at 15:23
add a comment |
up vote
0
down vote
up vote
0
down vote
When you build code-sharing projects you should use the --bundle
flag.
So your command should be:
tns run android --bundle
or tns run ios --bundle
If you keep forgetting the --bundle
flag, then you could use the scripts provided in package.json and run:
npm run android
or npm run ios
Additionally, if your project uses TypeScript 2.7, then you might need to update it to 2.8
As a side note: you don't need moduleId
in code-sharing projects, as webpack is taking care of this for you.
When you build code-sharing projects you should use the --bundle
flag.
So your command should be:
tns run android --bundle
or tns run ios --bundle
If you keep forgetting the --bundle
flag, then you could use the scripts provided in package.json and run:
npm run android
or npm run ios
Additionally, if your project uses TypeScript 2.7, then you might need to update it to 2.8
As a side note: you don't need moduleId
in code-sharing projects, as webpack is taking care of this for you.
edited Nov 12 at 12:39
answered Nov 12 at 8:42
Seba Wita
11
11
Hello Seba Wita, I do run the command tns run android --bundle. Maybe something is wrong on my pc. I will try again from a new pc from scratch and let you know.
– L1ghtk3ira
Nov 12 at 14:11
Also I did try before using the Nativescript Sidekick origionally. Not sure if that would cause an issue.
– L1ghtk3ira
Nov 12 at 14:13
We are going to release a new version of the @nativescript/schematics tomorrow, which should include an update for angular 7. It should also resolve an issue with the TypeScript version.
– Seba Wita
Nov 12 at 14:44
You believe is may be why the build is crashing? I did create a github ticket here if it helps: github.com/NativeScript/NativeScript/issues/6552. Thanks for the sturdy replies
– L1ghtk3ira
Nov 12 at 15:23
add a comment |
Hello Seba Wita, I do run the command tns run android --bundle. Maybe something is wrong on my pc. I will try again from a new pc from scratch and let you know.
– L1ghtk3ira
Nov 12 at 14:11
Also I did try before using the Nativescript Sidekick origionally. Not sure if that would cause an issue.
– L1ghtk3ira
Nov 12 at 14:13
We are going to release a new version of the @nativescript/schematics tomorrow, which should include an update for angular 7. It should also resolve an issue with the TypeScript version.
– Seba Wita
Nov 12 at 14:44
You believe is may be why the build is crashing? I did create a github ticket here if it helps: github.com/NativeScript/NativeScript/issues/6552. Thanks for the sturdy replies
– L1ghtk3ira
Nov 12 at 15:23
Hello Seba Wita, I do run the command tns run android --bundle. Maybe something is wrong on my pc. I will try again from a new pc from scratch and let you know.
– L1ghtk3ira
Nov 12 at 14:11
Hello Seba Wita, I do run the command tns run android --bundle. Maybe something is wrong on my pc. I will try again from a new pc from scratch and let you know.
– L1ghtk3ira
Nov 12 at 14:11
Also I did try before using the Nativescript Sidekick origionally. Not sure if that would cause an issue.
– L1ghtk3ira
Nov 12 at 14:13
Also I did try before using the Nativescript Sidekick origionally. Not sure if that would cause an issue.
– L1ghtk3ira
Nov 12 at 14:13
We are going to release a new version of the @nativescript/schematics tomorrow, which should include an update for angular 7. It should also resolve an issue with the TypeScript version.
– Seba Wita
Nov 12 at 14:44
We are going to release a new version of the @nativescript/schematics tomorrow, which should include an update for angular 7. It should also resolve an issue with the TypeScript version.
– Seba Wita
Nov 12 at 14:44
You believe is may be why the build is crashing? I did create a github ticket here if it helps: github.com/NativeScript/NativeScript/issues/6552. Thanks for the sturdy replies
– L1ghtk3ira
Nov 12 at 15:23
You believe is may be why the build is crashing? I did create a github ticket here if it helps: github.com/NativeScript/NativeScript/issues/6552. Thanks for the sturdy replies
– L1ghtk3ira
Nov 12 at 15:23
add a comment |
up vote
0
down vote
accepted
It seems it may be difficult for the nativescript team as the packages it relies on keep changing rapidly. This is the package.json setup I used thanks @NickIliev from the nativescript team, @skopekreep, and good old debugging. If you use this setup you should be fine.
Just be wary updating the packages in the future and test before committing your package.json.
As well as the main packages I would suggest you be careful updating and ensure you test:
typescript
@types/jasmine
nativescript-dev-webpack
tns-core-modules
{
"name": "myproject",
"nativescript": {
"id": "org.nativescript.myproject",
"tns-android": {
"version": "5.0.0"
}
},
"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 --bundle",
"ios": "tns run ios --bundle"
},
"private": true,
"dependencies": {
"@angular/animations": "~6.1.0",
"@angular/common": "~6.1.0",
"@angular/compiler": "~6.1.0",
"@angular/core": "~6.1.0",
"@angular/forms": "~6.1.0",
"@angular/http": "~6.1.0",
"@angular/platform-browser": "~6.1.0",
"@angular/platform-browser-dynamic": "~6.1.0",
"@angular/router": "~6.1.0",
"core-js": "^2.5.4",
"nativescript-angular": "~6.1.0",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.8",
"rxjs": "^6.0.0",
"tns-core-modules": "~5.0.2",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.8.0",
"@angular/cli": "^6.2.0",
"@angular/compiler-cli": "^7.0.3",
"@nativescript/schematics": "~0.4.0",
"@types/jasmine": "2.8.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "~4.2.1",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.0",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"nativescript-dev-sass": "~1.6.0",
"nativescript-dev-typescript": "~0.7.0",
"nativescript-dev-webpack": "^0.17.0",
"protractor": "~5.3.0",
"ts-node": "~5.0.1",
"tslint": "~5.9.1",
"typescript": "^3.1.6"
}
}
Steps:
1. Install latest version of Node JS
Install latest version of NPM
npm i -g @angular/cli
npm i -g @nativescript/schematics
Go into the folder and Replace the package.json, ensure to change name and id to your projects name
npm install
tns run android --bundle
I have issues System.err: android.content.res.Resources$NotFoundException: Resource ID #0xfffffff6 after using your package json
– Pedro Teran
Nov 14 at 16:44
Have you made other changes before that? If you follow this guide for a code sharing project: docs.nativescript.org/angular/code-sharing/… and then use my package.json before you use npm install it should be fine.
– L1ghtk3ira
Nov 14 at 18:10
I added some steps for you to follow. Ensure you have xcode or android installed with SDKs. Or have your ios or Android device connected.
– L1ghtk3ira
Nov 14 at 18:15
add a comment |
up vote
0
down vote
accepted
It seems it may be difficult for the nativescript team as the packages it relies on keep changing rapidly. This is the package.json setup I used thanks @NickIliev from the nativescript team, @skopekreep, and good old debugging. If you use this setup you should be fine.
Just be wary updating the packages in the future and test before committing your package.json.
As well as the main packages I would suggest you be careful updating and ensure you test:
typescript
@types/jasmine
nativescript-dev-webpack
tns-core-modules
{
"name": "myproject",
"nativescript": {
"id": "org.nativescript.myproject",
"tns-android": {
"version": "5.0.0"
}
},
"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 --bundle",
"ios": "tns run ios --bundle"
},
"private": true,
"dependencies": {
"@angular/animations": "~6.1.0",
"@angular/common": "~6.1.0",
"@angular/compiler": "~6.1.0",
"@angular/core": "~6.1.0",
"@angular/forms": "~6.1.0",
"@angular/http": "~6.1.0",
"@angular/platform-browser": "~6.1.0",
"@angular/platform-browser-dynamic": "~6.1.0",
"@angular/router": "~6.1.0",
"core-js": "^2.5.4",
"nativescript-angular": "~6.1.0",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.8",
"rxjs": "^6.0.0",
"tns-core-modules": "~5.0.2",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.8.0",
"@angular/cli": "^6.2.0",
"@angular/compiler-cli": "^7.0.3",
"@nativescript/schematics": "~0.4.0",
"@types/jasmine": "2.8.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "~4.2.1",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.0",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"nativescript-dev-sass": "~1.6.0",
"nativescript-dev-typescript": "~0.7.0",
"nativescript-dev-webpack": "^0.17.0",
"protractor": "~5.3.0",
"ts-node": "~5.0.1",
"tslint": "~5.9.1",
"typescript": "^3.1.6"
}
}
Steps:
1. Install latest version of Node JS
Install latest version of NPM
npm i -g @angular/cli
npm i -g @nativescript/schematics
Go into the folder and Replace the package.json, ensure to change name and id to your projects name
npm install
tns run android --bundle
I have issues System.err: android.content.res.Resources$NotFoundException: Resource ID #0xfffffff6 after using your package json
– Pedro Teran
Nov 14 at 16:44
Have you made other changes before that? If you follow this guide for a code sharing project: docs.nativescript.org/angular/code-sharing/… and then use my package.json before you use npm install it should be fine.
– L1ghtk3ira
Nov 14 at 18:10
I added some steps for you to follow. Ensure you have xcode or android installed with SDKs. Or have your ios or Android device connected.
– L1ghtk3ira
Nov 14 at 18:15
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
It seems it may be difficult for the nativescript team as the packages it relies on keep changing rapidly. This is the package.json setup I used thanks @NickIliev from the nativescript team, @skopekreep, and good old debugging. If you use this setup you should be fine.
Just be wary updating the packages in the future and test before committing your package.json.
As well as the main packages I would suggest you be careful updating and ensure you test:
typescript
@types/jasmine
nativescript-dev-webpack
tns-core-modules
{
"name": "myproject",
"nativescript": {
"id": "org.nativescript.myproject",
"tns-android": {
"version": "5.0.0"
}
},
"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 --bundle",
"ios": "tns run ios --bundle"
},
"private": true,
"dependencies": {
"@angular/animations": "~6.1.0",
"@angular/common": "~6.1.0",
"@angular/compiler": "~6.1.0",
"@angular/core": "~6.1.0",
"@angular/forms": "~6.1.0",
"@angular/http": "~6.1.0",
"@angular/platform-browser": "~6.1.0",
"@angular/platform-browser-dynamic": "~6.1.0",
"@angular/router": "~6.1.0",
"core-js": "^2.5.4",
"nativescript-angular": "~6.1.0",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.8",
"rxjs": "^6.0.0",
"tns-core-modules": "~5.0.2",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.8.0",
"@angular/cli": "^6.2.0",
"@angular/compiler-cli": "^7.0.3",
"@nativescript/schematics": "~0.4.0",
"@types/jasmine": "2.8.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "~4.2.1",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.0",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"nativescript-dev-sass": "~1.6.0",
"nativescript-dev-typescript": "~0.7.0",
"nativescript-dev-webpack": "^0.17.0",
"protractor": "~5.3.0",
"ts-node": "~5.0.1",
"tslint": "~5.9.1",
"typescript": "^3.1.6"
}
}
Steps:
1. Install latest version of Node JS
Install latest version of NPM
npm i -g @angular/cli
npm i -g @nativescript/schematics
Go into the folder and Replace the package.json, ensure to change name and id to your projects name
npm install
tns run android --bundle
It seems it may be difficult for the nativescript team as the packages it relies on keep changing rapidly. This is the package.json setup I used thanks @NickIliev from the nativescript team, @skopekreep, and good old debugging. If you use this setup you should be fine.
Just be wary updating the packages in the future and test before committing your package.json.
As well as the main packages I would suggest you be careful updating and ensure you test:
typescript
@types/jasmine
nativescript-dev-webpack
tns-core-modules
{
"name": "myproject",
"nativescript": {
"id": "org.nativescript.myproject",
"tns-android": {
"version": "5.0.0"
}
},
"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 --bundle",
"ios": "tns run ios --bundle"
},
"private": true,
"dependencies": {
"@angular/animations": "~6.1.0",
"@angular/common": "~6.1.0",
"@angular/compiler": "~6.1.0",
"@angular/core": "~6.1.0",
"@angular/forms": "~6.1.0",
"@angular/http": "~6.1.0",
"@angular/platform-browser": "~6.1.0",
"@angular/platform-browser-dynamic": "~6.1.0",
"@angular/router": "~6.1.0",
"core-js": "^2.5.4",
"nativescript-angular": "~6.1.0",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.8",
"rxjs": "^6.0.0",
"tns-core-modules": "~5.0.2",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.8.0",
"@angular/cli": "^6.2.0",
"@angular/compiler-cli": "^7.0.3",
"@nativescript/schematics": "~0.4.0",
"@types/jasmine": "2.8.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "~4.2.1",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.0",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"nativescript-dev-sass": "~1.6.0",
"nativescript-dev-typescript": "~0.7.0",
"nativescript-dev-webpack": "^0.17.0",
"protractor": "~5.3.0",
"ts-node": "~5.0.1",
"tslint": "~5.9.1",
"typescript": "^3.1.6"
}
}
Steps:
1. Install latest version of Node JS
Install latest version of NPM
npm i -g @angular/cli
npm i -g @nativescript/schematics
Go into the folder and Replace the package.json, ensure to change name and id to your projects name
npm install
tns run android --bundle
edited Nov 14 at 18:13
answered Nov 12 at 3:32
L1ghtk3ira
62021029
62021029
I have issues System.err: android.content.res.Resources$NotFoundException: Resource ID #0xfffffff6 after using your package json
– Pedro Teran
Nov 14 at 16:44
Have you made other changes before that? If you follow this guide for a code sharing project: docs.nativescript.org/angular/code-sharing/… and then use my package.json before you use npm install it should be fine.
– L1ghtk3ira
Nov 14 at 18:10
I added some steps for you to follow. Ensure you have xcode or android installed with SDKs. Or have your ios or Android device connected.
– L1ghtk3ira
Nov 14 at 18:15
add a comment |
I have issues System.err: android.content.res.Resources$NotFoundException: Resource ID #0xfffffff6 after using your package json
– Pedro Teran
Nov 14 at 16:44
Have you made other changes before that? If you follow this guide for a code sharing project: docs.nativescript.org/angular/code-sharing/… and then use my package.json before you use npm install it should be fine.
– L1ghtk3ira
Nov 14 at 18:10
I added some steps for you to follow. Ensure you have xcode or android installed with SDKs. Or have your ios or Android device connected.
– L1ghtk3ira
Nov 14 at 18:15
I have issues System.err: android.content.res.Resources$NotFoundException: Resource ID #0xfffffff6 after using your package json
– Pedro Teran
Nov 14 at 16:44
I have issues System.err: android.content.res.Resources$NotFoundException: Resource ID #0xfffffff6 after using your package json
– Pedro Teran
Nov 14 at 16:44
Have you made other changes before that? If you follow this guide for a code sharing project: docs.nativescript.org/angular/code-sharing/… and then use my package.json before you use npm install it should be fine.
– L1ghtk3ira
Nov 14 at 18:10
Have you made other changes before that? If you follow this guide for a code sharing project: docs.nativescript.org/angular/code-sharing/… and then use my package.json before you use npm install it should be fine.
– L1ghtk3ira
Nov 14 at 18:10
I added some steps for you to follow. Ensure you have xcode or android installed with SDKs. Or have your ios or Android device connected.
– L1ghtk3ira
Nov 14 at 18:15
I added some steps for you to follow. Ensure you have xcode or android installed with SDKs. Or have your ios or Android device connected.
– L1ghtk3ira
Nov 14 at 18:15
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53196685%2fnativescript-angular-code-sharing-project%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I have seen his happening when I don't inject
moduleId
in component decorator - (moduleId: module.id
)– Manoj
Nov 7 at 20:02
I have the same problem. If I find something I'll let you know
– Jonas
Nov 7 at 21:11
Thanks, as will I. This should work out of the box for Android and iOS so seems strange
– L1ghtk3ira
Nov 7 at 21:37
Has anyone found a solution for this? I am not sure if this is an issue and the nativescript team is aware or not.
– L1ghtk3ira
Nov 10 at 22:53
1
New update it seems to be working now with tns run android --bundle. It failed at first and about 3 minutes later it closed and re-opened working. Not sure if the file was not converted to as a starting point so it starts with a crash and ends up rebuilding when its done.
– L1ghtk3ira
Nov 12 at 3:22