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
can someone help me i'm trying error in import , project in nextJs #433
Comments
I had faced that before, its probably because of some nodejs methods being called from browser environment. I refered to this, but even this didn't solve the issue,
|
I get a similar message:
|
Try adding this to next.config.js: module.exports = {
webpack: (config) => {
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
path: false
};
config.experiments = {
...config.experiments,
topLevelAwait: true
};
return config;
},
}; The |
can i do the same if i am using react app? |
No, the webpack config for CRA is bit different. Though this issue is not supposed to happen in React app. I think you are using a library which is built for Node.js. |
./node_modules/web-tree-sitter/tree-sitter.js:1:747
Module not found: Can't resolve 'fs'
Import trace for requested module:
./node_modules/curlconverter/dist/src/bash-parser-web.js
./node_modules/curlconverter/dist/src/util.js
./node_modules/curlconverter/dist/src/index.js
./src/globals/components/dymanic-form/HTTPBodyField.tsx
./src/globals/components/dymanic-form/RenderTypeOfInput.tsx
./src/globals/components/dymanic-form/RenderForm.tsx
./src/views/builder/components/sidebar/tabs/actions/index.tsx
./src/views/builder/components/sidebar/DefaultNodeView/index.tsx
./src/views/builder/components/sidebar/index.tsx
./src/views/builder/index.tsx
./src/pages/builder/[id]/index.tsx
https://nextjs.org/docs/messages/module-not-found
The text was updated successfully, but these errors were encountered: