Open andreeapurta opened 1 year ago
I also faced same problem, I have installed npm again with command "npm install" and my problem got solved.
The "npm install" didn't solve for me. But putting this in next.config.js worked fine:
module.exports = (phase, { defaultConfig }) => {
return {
...defaultConfig,
webpack: (config) => {
config.resolve = {
...config.resolve,
fallback: {
fs: false,
path: false,
os: false
}
};
return config;
}
};
};
@roberiof after adding this workaround i am getting "Module not found: Can't resolve 'crypto'" this error in nextjs code is similar to you
Error: Can't resolve 'fs' in _./nodemodules/html-to-docx/dist/html-to-docx.esm.js:1:164 My code is exactly like this: https://github.com/privateOmega/html-to-docx/blob/master/example/react-example/src/App.js I am using react and next.js And I installed: "html-to-docx": "^1.8.0", "file-saver": "^2.0.5", Can somebody help me please?