-
Notifications
You must be signed in to change notification settings - Fork 28
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
Import error - You may need an appropriate loader to handle this file type #607
Comments
Hi @mshearer0 may I ask you what is your setup? Which version of bee-js are you using? 3.3.3? Are you using typescript? What is your build tooling? |
Hi, thanks for helping. I get the error using 3.3.3. Downgrading to 3.3.2 and minimum dependencies (ky: '0.25.1' and 'ky-universal': '0.8.2',) removes the errors but instead i get:
I can run the react example from https://github.com/ethersphere/examples-js ok. I'm trying to run the Dapp Auction Vue example from: https://github.com/ethereumbook/ethereumbook to help me learn decentralised apps. I couldn't get Bee to accept an http post of multipart formdata due to absence of content type, so it was recommended (see ethersphere/bee#2864) that i try Bee-js instead. I saw your post #28 (comment) - not sure if Bee supports formdata yet? Does that help? |
Hey there, My expectation is that somehow you have a newer version of Ky that is ESM only and hence the error message. |
Many thanks, did you mean 2.5.1 or 0.25.1? i don't get the original errors if i downgrade to ky 0.25.1:
node_modules/ky/package.json begins with:
but i then get:
as above. |
Sorry yeah, I meant So you are also using Please definitely use |
Hi, with 3.3.3 I get:
npm list:
|
Hmmm, I see. That seems like your build stack does not handle the I am afraid this is not related to Looking at https://github.com/ethereumbook/ethereumbook/blob/develop/code/auction_dapp/frontend/package.json the example is already quite old (4 years!). They for example use old dependencies like webpack 3 and old versions of Babel as well. If you want to run this example with bee-js, I am afraid you will have to update these dependencies which in my experience with these tools might not be trivial nor quick thing to do :-( I am gonna close this issue, but let me know if it won't work even when you update to some more modern build setup. |
Upgrading the application build setup to Webpack 4 and Babel 7 allowed the import to compile and bee-js to be used. Thanks to @AuHau for support |
Including
I get 2 errors:
and
I'm trying to incorporate into a Vue App.
Any help appreciated.
The text was updated successfully, but these errors were encountered: