Closed serhiipalash closed 6 years ago
You can see that webpack is trying to use node-cuid.js instead of the browser build. I assume you're seeing this error in the browser?
Yes, I am seeing this error in the browser.
Tell Webpack to use the browser build (see the "browser" key in package.json
). I'm not sure why it's not respecting the "browser" key -- do you have a highly customized browser build?
Hm, it worked when I added this to my package.json
"browser": {
"cuid": "./node_modules/cuid/dist/browser-cuid.js"
}
Not sure why it was broken. I have target: 'web'
in my webpack.config.js
Can you create a PR?
Didn't update any package or system environment, but today when I call
cuid()
I getTypeError: process.pid is undefined
nodePrint
[path to my react component]
cuid
webpack:///./~/cuid/dist/node-cuid.js?:49:23
Using cuid: 1.3.8 webpack: 2.2.0 webpack-dev-server: 2.2.0 node v6.9.4 npm v3.10.10 yarn 0.20.3
Tried on cuid@1.2.0, got the same result.