You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
./node_modules/numjs/src/images/data.js:3:11-26 - Error: Module not found: Error: Can't resolve 'path' in 'D:\Users...\node_modules\numjs\src\images'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }'
- install 'path-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "path": false }
None of this both troubleshoots is working with your module. Can you resolve this breaking change please ?
The text was updated successfully, but these errors were encountered:
@falktan I'm just now also getting this issue. I did some digging and it appears to be src/images/data.js:6
varDATA_DIR=path.join(__dirname,'../../data');
I'm not entirely clear since I'm still new to web development, but it appears that __dirname is not really defined in a browser environment, or at least in Webpack. I changed this line to just be a simple relative import like so:
varDATA_DIR='../../data';
Which appears to fix it.
If you're still interested in a minimal reproducible example, I can offer one, but if you don't see a problem with this change, I'm happy to make a PR @falktan.
./node_modules/numjs/src/images/data.js:3:11-26 - Error: Module not found: Error: Can't resolve 'path' in 'D:\Users...\node_modules\numjs\src\images'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }'
- install 'path-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "path": false }
None of this both troubleshoots is working with your module. Can you resolve this breaking change please ?
The text was updated successfully, but these errors were encountered: