Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raising multiple "Breaking Change" errors when installing nsfwjs in React Js #724

Open
Yawan-1 opened this issue Mar 13, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Yawan-1
Copy link

Yawan-1 commented Mar 13, 2023

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

@GantMan
Copy link
Member

GantMan commented Mar 13, 2023

I'm off this week. @cdanwards - can you take a quick look at this if you get any time this week?

@GantMan GantMan added the bug Something isn't working label Mar 13, 2023
@cdanwards
Copy link
Member

@Yawan-1 I'm going to take a look at this! How did you create the app? (Some users have had issues with vite)

@cdanwards cdanwards self-assigned this Mar 14, 2023
@Yawan-1
Copy link
Author

Yawan-1 commented Mar 14, 2023

I didn't create the app using vite but with npx create-react-app. @cdanwards

@Yawan-1 Yawan-1 closed this as completed Dec 13, 2023
@Yawan-1 Yawan-1 reopened this Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants