nativescript-aws-sdk
nativescript-aws-sdk copied to clipboard
Module not found: Error: Can't resolve 'nativescript-aws-sdk'
demo app(s) for sample usage
I can't run the code because when I hit tns run android I get Module not found: Error: Can't resolve 'nativescript-aws-sdk'
Make sure to check the existing issues in this repository
If the demo apps cannot help and there is no issue for your problem, tell us about it
Please, ensure your title is less than 63 characters long and starts with a capital letter.
Which platform(s) does your issue occur on?
Emulator
Please, provide the following version numbers that your issue occurs with:
-
CLI: (run
tns --version
to fetch it) 6.0.3 -
Cross-platform modules: (check the 'version' attribute in the
node_modules/tns-core-modules/package.json
file in your project)"nativescript": { "id": "org.nativescript.Deneme", "tns-android": { "version": "6.0.2" }, "tns-ios": { "version": "6.0.2" } }, "description": "NativeScript Application", "license": "SEE LICENSE IN
", "repository": " ", "dependencies": { "nativescript-aws-sdk": "0.0.4", "nativescript-theme-core": "~1.0.6", "tns-core-modules": "~6.0.0" }, "devDependencies": { "nativescript-dev-webpack": "~1.1.0" }, "gitHead": "42f2a6a9c94eaf9c68d2a41e0daaa1a2544bc28f", "readme": "NativeScript Application" } -
Runtime(s): (look for the
"tns-android"
and"tns-ios"
properties in thepackage.json
file of your project) "tns-android": { "version": "6.0.2" }, "tns-ios": { "version": "6.0.2" } -
Plugin(s): (look for the version numbers in the
package.json
file of your project and paste your dependencies and devDependencies here)
Please, tell us how to recreate the issue in as much detail as possible.
Describe the steps to reproduce it. I just want to download or upload json files from my aws s3 bucket, I try to use your demo app but when I hit tns run android app crashes and I get
ERROR in ./views/start-page/start-page.js
Module not found: Error: Can't resolve 'nativescript-aws-sdk' in'/Users/sezginozcan/Deneme/app/views/start-page'
@ ./views/start-page/start-page.js 3:11-42
@ . sync (?<!\bApp_Resources\b.*)\.(xml|css|js|(?<!\.d\.)ts|(?<!\b_[\w-]*\.)scss)$
@ ./app.js
Webpack compilation complete. Watching for file changes.
Webpack build done!
Project successfully prepared (android)
Successfully transferred runtime.js on device 192.168.56.101:5555.
Restarting application on device 192.168.56.101:5555...
Successfully synced application org.nativescript.Deneme on device 192.168.56.101:5555.
ActivityManager: Start proc org.nativescript.Deneme for activity org.nativescript.Deneme/com.tns.NativeScriptActivity: pid=6587 uid=10059 gids={50059, 1028, 1015, 3003}
JS: HMR: Hot Module Replacement Enabled. Waiting for signal.
System.err: An uncaught Exception occurred on "main" thread.
System.err: Unable to start activity ComponentInfo{org.nativescript.Deneme/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed
System.err: Error: Building UI from XML. @app-root.xml:1:1
System.err: > Cannot find module 'nativescript-aws-sdk'
System.err: StackTrace:
System.err: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.Deneme/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed
System.err: Error: Building UI from XML. @app-root.xml:1:1
System.err: > Cannot find module 'nativescript-aws-sdk'
System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
System.err: at android.app.ActivityThread.access$600(ActivityThread.java:141)
System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
System.err: at android.os.Handler.dispatchMessage(Handler.java:99)
System.err: at android.os.Looper.loop(Looper.java:137)
System.err: at android.app.ActivityThread.main(ActivityThread.java:5103)
System.err: at java.lang.reflect.Method.invokeNative(Native Method)
System.err: at java.lang.reflect.Method.invoke(Method.java:525)
System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
System.err: at dalvik.system.NativeStart.main(Native Method)
System.err: Caused by: com.tns.NativeScriptException: Calling js method onCreate failed
System.err: Error: Building UI from XML. @app-root.xml:1:1
System.err: > Cannot find module 'nativescript-aws-sdk'
System.err: at com.tns.Runtime.callJSMethodNative(Native Method)
System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1242)
System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:1122)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1109)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1089)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1081)
System.err: at com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:19)
System.err: at android.app.Activity.performCreate(Activity.java:5133)
System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
System.err: ... 11 more
ActivityManager: Process org.nativescript.Deneme (pid 6587) has died.
Is there any code involved?
- provide a code example to recreate the problem
- (EVEN BETTER) provide a .zip with application or refer to a repository with application where the problem is reproducible.
try :
import { S3 } from 'nativescript-aws-sdk/s3';