I installed both of @tldraw/tldraw and @tldraw/core packages into my Next 11 app.
First I faced the issue of importing CSS files from node_modules in which I used the next-transpile-modules version 8.0.0 and it appears to be solved.
Then I faced this issue ESM packages (browser-fs-access) need to be imported. Use 'import' to reference the package instead
I tried many possible solutions but I can't wrap my head around it.
While in the terminal of the app. This error appears
error - ./node_modules/@tldraw/tldraw/dist/index.mjs
Module parse failed: Identifier '_a' has already been declared (26278:8)
File was processed with these loaders:
* ./node_modules/@next/react-refresh-utils/loader.js
* ./node_modules/next/dist/build/babel/loader/index.js
You may need an additional loader to handle the result of these loaders.
While the code in my page is really simple. I just import and use the Tldraw component from the @tldraw/tldraw package.
It would be great to know why is this happening and how to solve it
I installed both of @tldraw/tldraw and @tldraw/core packages into my Next 11 app.
First I faced the issue of importing CSS files from node_modules in which I used the next-transpile-modules version 8.0.0 and it appears to be solved.
Then I faced this issue ESM packages (browser-fs-access) need to be imported. Use 'import' to reference the package instead
I tried many possible solutions but I can't wrap my head around it.
While in the terminal of the app. This error appears
While the code in my page is really simple. I just import and use the Tldraw component from the @tldraw/tldraw package.
It would be great to know why is this happening and how to solve it