Closed milochristiansen closed 3 years ago
You need to load /nanoid.js
instead of /index.js
.
Something like https://unpkg.com/nanoid/nanoid.js
That does indeed work. I'm not sure why Unpkg would give me the wrong file by default. something is probably misconfigured.
It gives you default file, but this file was created for Node.js and doesn’t work in browser.
You can ask Unpkg to support package.browser
key.
The very first line in the module returned by unpkg is:
Which is a 404.
What is this "crypto" library, and where is it actually? I'm using import maps in my project so I can forcibly patch the issue if I know where to find the module I need.
For now I'm using the
nanoid/non-secure
package since that one is actually zero dependencies, but it obviously isn't ideal.