package that uses buffer as dependency fails
See original GitHub issueError
[mf:err] MiniflareError: Unable to resolve "dist/index.mjs" dependency "buffer": no matching module rules
[mf:err] MiniflareError: Unable to resolve "dist/index.mjs" dependency "buffer": no matching module rules
at ScriptLinker._linker (/home/wighawag/dev/wighawag/etherplay/conquest-agent-service/node_modules/miniflare/src/scripts.ts:126:13)
at ModuleWrap.<anonymous> (internal/vm/module.js:321:30)
at SourceTextModule.<computed> (internal/vm/module.js:320:36)
at SourceTextModule.link (internal/vm/module.js:198:22)
at ScriptBlueprint.buildModule (/home/wighawag/dev/wighawag/etherplay/conquest-agent-service/node_modules/miniflare/src/scripts.ts:42:18)
at Miniflare._Miniflare_reloadWorker (/home/wighawag/dev/wighawag/etherplay/conquest-agent-service/node_modules/miniflare/src/index.ts:180:26)
at Miniflare._Miniflare_watchCallback (/home/wighawag/dev/wighawag/etherplay/conquest-agent-service/node_modules/miniflare/src/index.ts:124:29)
at OptionsWatcher._init (/home/wighawag/dev/wighawag/etherplay/conquest-agent-service/node_modules/miniflare/src/options/watcher.ts:100:16)
at Miniflare.getOptions (/home/wighawag/dev/wighawag/etherplay/conquest-agent-service/node_modules/miniflare/src/index.ts:292:5)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Error: Unable to resolve module `buffer` React Native
First Install the missing dependency buffer : npm install buffer --save OR yarn add buffer. Second. Up in the top of your file...
Read more >Module not found: Can't resolve 'buffer' error [Solved]
The error "Module not found: Error: Can't resolve 'buffer'" occurs because there has been a breaking change in Webpack version 5. To solve...
Read more >buffer - npm
Start using buffer in your project by running `npm i buffer`. ... buffer. TypeScript icon, indicating that this package has built-in type ...
Read more >Overview | Protocol Buffers - Google Developers
Protocol buffers provide a language-neutral, platform-neutral, extensible mechanism for serializing structured data in a forward-compatible ...
Read more >Best practices for working with AWS Lambda functions
To have full control of the dependencies your function uses, package all of ... In the case of CreateFunction, AWS Lambda will fail...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
close?
Hey! 👋 It looks like you’re trying to import an npm module without a build-step. Workers only natively support modules that are located in your upload directory, not node_modules. Check out https://miniflare.dev/recipes/esbuild.html for an example of using esbuild to bundle your code first. Let me know if you have any issues with this.