nsfwjs
nsfwjs copied to clipboard
Raising multiple "Breaking Change" errors when installing nsfwjs in React Js
I am trying to install nsfwjs in my react app (just created to test nsfwjs) and It is showing bunch of errors
right after when I run npm start
.
Errors like
Can't resolve 'assert' in **/path/project/**
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "assert": require.resolve("assert/") }'
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "stream": require.resolve("stream-browserify") }'
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "buffer": require.resolve("buffer/") }'
- install 'buffer'
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "stream": require.resolve("stream-browserify") }'
- install 'stream-browserify'
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
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 want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "zlib": require.resolve("browserify-zlib") }'
- install 'browserify-zlib'
I have no idea why it is showing these errors. Do I have to install these recommended libraries/packages separately?
My react version is 18.2.0
I'm off this week. @cdanwards - can you take a quick look at this if you get any time this week?
@Yawan-1 I'm going to take a look at this! How did you create the app? (Some users have had issues with vite)
I didn't create the app using vite
but with npx create-react-app
. @cdanwards