You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use your library in a React app but I'm facing a weird import issue at compile time only. When I run REACT_APP_API_URL=http://localhost:8000 react-app-rewired start it works, but when I run react-app-rewired build I got this error message :
> react-app-rewired build
Creating an optimized production build...
Failed to compile.
./src/serial/MicropythonSerialInterface.ts
Attempted import error: 'EspLoader' is not exported from '@toit/esptool.js'.
esptool.js version 0.12.3, typescript version 4.7.4, node version v16.18.0.
My import statement : import { EspLoader } from '@toit/esptool.js';
The text was updated successfully, but these errors were encountered:
The original author of the library is not at the company anymore, and we are lacking the skill set to debug react related issues.
Sorry we can't do more at this time.
I found a way to make it work. I just replaced the compilerOptions.module from CommonJS to esnext. I did it several month ago though, so I don't remember exactly why I came with this solution but it has been used in production for several month now and it works. I think the reason is that we use ES modules in our project and there are some incompatibilities between CommonJS and ESM.
Hello,
I'm trying to use your library in a React app but I'm facing a weird import issue at compile time only. When I run
REACT_APP_API_URL=http://localhost:8000 react-app-rewired start
it works, but when I runreact-app-rewired build
I got this error message :esptool.js version
0.12.3
, typescript version4.7.4
, node versionv16.18.0
.My import statement :
import { EspLoader } from '@toit/esptool.js';
The text was updated successfully, but these errors were encountered: