Closed wfs498121294 closed 1 year ago
Is it in browser or in Node.js?
I have same problem, in a rollup js component with nanoid used in create-react-app, browser @ai
@georgezouq do you have this issue in browser or when you run tests in Node.js?
Is it in browser or in Node.js?
wx miniprogram in Node.js
@wfs498121294 you should add Web Crypto polyfill or avoid using bundler for Node.js
@wfs498121294 you should add Web Crypto polyfill or avoid using bundler for Node.js
thanks,I am puzzled,I'm a rookie,I do not know how to solve it.
Is it in browser or in Node.js?
thanks,I am puzzled,I'm a rookie,I do not know how to solve it.
I got the same issue in wechat mini-program development, I solved it the with import { nanoid } from 'nanoid/non-secure'
. pls have a try with this, good luck.
Hello,I have a problem
vue2.0 js
WAServiceMainContext.js?t=wechat&s=1666572189672&v=2.27.0:1 ReferenceError: crypto is not defined at nanoid (index.browser.js:20) at VueComponent.tapService (mine.vue:136) at index.js?543d:1892 at Array.forEach ()
at index.js?543d:1847
at Array.forEach ()
at zo.handleEvent [as __e] (index.js?543d:1837)
at Object.i.safeCallback (WASubContext.js?t=wechat&s=1666572189672&v=2.27.0:1)
at WASubContext.js?t=wechat&s=1666572189672&v=2.27.0:1
at Cn (WASubContext.js?t=wechat&s=1666572189672&v=2.27.0:1)(env: macOS,mp,1.06.2209190; lib: 2.27.0)