简体   繁体   中英

Nativescript: unable to create application… Failed to load module: …app/main.js

I'm fiddling with the sample-Groceries application, and I've installed NativeScript and angular 2 on two machines now and on both, I get the same error message when I try to do:

tns run android --emulator

IOS runs without problems but on Android, I get the following error:

unhandled exception java.lang.runtimeexception unable to create application... Failed to load module: ...app/main.js

(see image) I also tried an older API version 22.

The only answers I found were about changing the app.js, but I can't find that file.

Hope someone can help.

在此处输入图片说明

This is actually a pretty simple issue to fix; Enter your the app folder and type:

npm install tns-core-modules@latest --save

And then you need to rebuild you app and you should be good to go.

See: http://fluentreports.com/blog/?p=323

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM