-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Directory import of buffer
not supported with ES modules
#129
Comments
@paul-kuihi Patching the package is one way to go. The other way is to add the remix pwa packages to |
This is great, thanks @ShafSpecs ! I've moved from the patch to config and is working nicely both locally and deployed. |
I guess it's not so much of a gotcha but likely part of the standard installation. I created a baseline Remix project (using https://remix.run/docs/en/main/other-api/create-remix) and only went through the installation steps and ran into this issue. Perhaps adding to the walkthrough here: https://remix-pwa.run/docs/installation#set-up-your-remix-config and removing the "You don't need to change any other thing in your Remix config." The repo created by following the steps in Create Remix + Remix PWA: https://github.com/Kikketer/remix-base |
👍 Working on the new release of remix-pwa and the cache package is getting deprecated. Hopefully, that sorts out a lot |
I had to go to: node_modules/@remix-pwa/cache/dist/src/cache.js and edit the first line: |
Description
When starting up the app with
npm run dev
I get the follow error:How to replicate
npx create-remix@latest
npm run dev
I have added ESLinting and formatting to the project, but none of these seem to have changed any of the node module resolution options set by remix.
Workaround
If I patch
cache.js
fromimport * as B from 'buffer/';
toimport * as B from 'buffer/index.js';
then it resolves the issue, but seeing as how other people have this working (and I can't see anything like this in the playground) there must be a configuration I have wrong somewhere in my project.For now, I'm going to patch the file and keep moving, but if anyone can replicate or advise, that would be great.
The text was updated successfully, but these errors were encountered: