FredKSchott / rollup-plugin-polyfill-node

A modern Node.js polyfill for your Rollup bundle.
Other
176 stars 55 forks source link

missing shims for nodejs still occured even after adding node-polyfills #59

Open Rizary opened 2 years ago

Rizary commented 2 years ago

Hi,

I have a small project that use node polyfills, I have described the error here: https://github.com/blocknative/web3-onboard/issues/1204

and after adding the node-polyfills, I still get the following warning:

(!) Missing shims for Node.js built-ins
Creating a browser bundle that depends on "url", "util", "events", "buffer", "assert", "path", "os", "stream", "https", "http" and "zlib". You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node
http://localhost:8189 -> /home/rizary/ischain/halalaNFT/frontend/apps/devhtml
LiveReload enabled
(!) `this` has been rewritten to `undefined`

(!) Missing global variable names
Use output.globals to specify browser global variable names corresponding to external modules
url (guessing 'require$$0$5')
util (guessing 'require$$0$6')
crypto (guessing 'require$$0$7')
events (guessing 'require$$0$a')
buffer (guessing 'require$$2$6')
assert (guessing 'require$$0$b')
fs (guessing 'require$$0$8')
path (guessing 'require$$1$4')
os (guessing 'require$$2$7')
stream (guessing 'require$$0$9')
string_decoder/ (guessing 'require$$10$3')
https (guessing 'require$$1$5')
http (guessing 'require$$2$8')
net (guessing 'require$$3$4')
tls (guessing 'require$$4$3')
zlib (guessing 'require$$0$c')

and in the browser, I got :

index.js:661 Uncaught ReferenceError: require$$0$5 is not defined
    at index.js:661:23
joewagner commented 1 year ago

@Rizary I seem to be having the same issue. Did you find a solution or workaround?