Closed tomploem closed 3 years ago
Looks like it's failing because of the ?
...but this should be working in Node.js 16.
Would you be able to provide an example project similar to the image-gallery frontend app? I might be missing some small details here 🤔
I also experience this error... I am using the code snippet shared from https://docs.web3.storage/#create-the-upload-script but using node 16 does solve the problem
@tomploem @coolcorexix according to https://node.green/#ES2020 Node.js 14 supports "optional chaining operator (?.)" please can you double check you are using Node.js 14 or 16 with node --version
?
Hey @alanshaw, i can confirm the error is happening with v14 and v16. My application compiles from typescript so it might have something to do with this?
Does it work on your machine with v14 or higher?
@tomploem in that case, I would need you to share your tsconfig.json and the command you use for running the web3storage script. Because typescript allow user to specify target
and module
so there's high chance your config crash the command
@tomploem do you have some code I can look at to double check?
Hey folks - closing for now, but please reopen if you're still experiencing this and when you get a chance to add more detail!
I am trying to use web3 storage in a NodeJS (Express) application. The application can not start due to following error:
I tried to use the library with node 14.x and 16.x but had no success so far. Any tips on how to use the library in a backend service?