Closed efraindx closed 2 years ago
@efraindx I don't believe this will work. Amplify doesn't officially support NodeJS, it is designed for frontend mobile/web applications. I believe when you package it up it converts it to a NodeJS file system which is probably the cause of this error
@tannerabread DataStore
is working good, we're able to fetch and save data to AWS without any errors in the packaged application. We're only getting the error when using Storage
. I also realized that the file is saved correctly in AWS when we get the error.
@efraindx New to electron so noob question here, but which way did you go about debugging the app once you packaged it? I debugged it this way
Also is the packaged app the one that shows up in release/build/<system>/Electron.app
?
I was able to get to that part following your steps and my image is uploading fine, with no errors showing in my debugging console
@tannerabread to debug the app, I enable the option to open the DevTools in the main.js https://stackoverflow.com/a/53574566/3188036
The packaged app should be in the dist
folder. Can you please share your app to see what I may be missing?
@efraindx I couldn't get the debugger to work as you described, but I'm on Mac so maybe it's different
Looking at package.json
on the build settings from the sample app you sent, it looks like the finished app gets pushed to release/build/<system>/ElectronReact.app
by default. It does however pull the resources from the dist
folder and package.json
Check out my repo and src/renderer/App.tsx
for the changes that I made to this app
@efraindx were you able to figure out your issue?
@tannerabread I was able to run your project locally and it worked for me as well without any errors. I'm still trying to figure out what I'm missing from my project. I'll post here once I find this.
hi @efraindx just curious if you were ever able to check this? I was thinking if you couldn't find any differences in the projects, maybe following your own repo steps with a new project and seeing if you still get the issue you described
Hi 👋 Closing this as we have not heard back from you. If you are still experiencing this issue and in need of assistance, please feel free to comment and provide us with any information previously requested by our team members so we can re-open this issue and be better able to assist you.
Thank you!
@tannerabread sorry for the late reply. I realized that the project was using parcel
instead of webpack
, after migrating the project to webpack
it worked perfectly!!! Thanks for your time!
You're welcome! Glad you found the issue!
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
Storage
Amplify Categories
storage
Environment information
Describe the bug
I'm working on an electron React app with Amplify.
I'm getting this error:
TypeError: stream.pipe is not a function
when trying to upload an image using Amplify Storage:Note: I'm only getting this error in the packaged application, when I run the app locally it works.
Expected behavior
Upload the image without any errors
Reproduction steps
npm run package
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
This is the stack trace visually