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

Module not found: Error: Can't resolve 'fs' in './node_modules/docx4js/lib' #67

Open
Abiram-N opened this issue Jul 28, 2022 · 0 comments

Comments

@Abiram-N
Copy link

Error when running npm start . Works good in React v17 and react-scripts v4. but fails to run in Reactv18 and react-scripts v5

Compiled with problems:

ERROR in ./node_modules/docx4js/lib/document.js 340:17-45  
 
Module not found: Error: Can't resolve 'fs' in './node_modules/docx4js/lib'

package.json for reference

{

"name": "parser",

"version": "0.1.0",

"private": true,

"dependencies": {

"@testing-library/jest-dom": "^5.16.4",

"@testing-library/react": "^13.3.0",

"@testing-library/user-event": "^13.5.0",

"buffer": "^6.0.3",

"docx4js": "^3.2.20",

"react": "^18.2.0",

"react-dom": "^18.2.0",

"react-scripts": "5.0.1",

"web-vitals": "^2.1.4"

},

"scripts": {

"start": "react-scripts start",

"build": "react-scripts build",

"test": "react-scripts test",

"eject": "react-scripts eject"

},

"eslintConfig": {

"extends": [

"react-app",

"react-app/jest"

]

},

"browserslist": {

"production": [

">0.2%",

"not dead",

"not op_mini all"

],

"development": [

"last 1 chrome version",

"last 1 firefox version",

"last 1 safari version"

]

}

}
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

1 participant