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

process is not defined #1689

Closed
quanbui1997 opened this issue Sep 11, 2023 · 6 comments
Closed

process is not defined #1689

quanbui1997 opened this issue Sep 11, 2023 · 6 comments

Comments

@quanbui1997
Copy link

i have a Reactjs project and get the isssue process is not defined when compile. Is there any solution? Please help me
dependencies
image
craco.config.js
image
error
image

@robertsLando
Copy link
Member

If you have an index.html entrypoint you may want to try adding process manually there like this comment suggest (replace Buffer with process):

#1639 (comment)

@quanbui1997
Copy link
Author

If you have an index.html entrypoint you may want to try adding process manually there like this comment suggest (replace Buffer with process):

#1639 (comment)

please show me how to replace Buffer with process

@robertsLando
Copy link
Member

@quanbui1997 are you using:

import * as mqtt from 'mqtt/dist/mqtt'

?

@kandahk
Copy link

kandahk commented Sep 25, 2023

It worked for me using this 'mqtt/dist/mqtt'

@quanbui1997
Copy link
Author

@quanbui1997 are you using:

import * as mqtt from 'mqtt/dist/mqtt'

?

tks for help, it worked

@robertsLando
Copy link
Member

FYI starting from 5.2.1 you can now import mqtt using:

import mqtt from 'mqtt'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants