I added a package to my node project and then suddenly Gracefufs causes the entire project to break. Can I repro maybe not since it's a big project but if this module only works in toy projects and breaks big projects with no explanation then that is a serious problem.
Import trace for requested module:
./node_modules/webpack/lib/node/NodeEnvironmentPlugin.js
./node_modules/webpack/lib/index.js
./node_modules/next/dist/compiled/webpack/webpack.js
./node_modules/next/dist/build/webpack/plugins/define-env-plugin.js
./node_modules/next/dist/build/swc/index.js
./src/components/Common/BoatPages.jsx
./src/components/Home/BoatPicker.jsx
./src/components/Home/LandingPreview.jsx
automatically enabled Fast Refresh for 1 custom loader
⨯ ./node_modules/graceful-fs/graceful-fs.js:1:9
Module not found: Can't resolve 'fs'
I upgraded to latest nextJS 14.1.0, but that didn't help.
I tried adding this to my application at the top layout.jsx layer:
import realFs from 'fs';
import gracefulFs from 'graceful-fs';
gracefulFs.gracefulify(realFs);
Still no JOY.
When I go to the actual fs module in the node_modules folder I can find this readme:
Security holding package
This package name is not currently in use, but was formerly occupied
by another package. To avoid malicious use, npm is hanging on to the
package name, but loosely, and we'll probably give it to you if you
want it.
You may adopt this package by contacting support@npmjs.com and
requesting the name.
There is no code in the module and it has the followng package.json
I added a package to my node project and then suddenly Gracefufs causes the entire project to break. Can I repro maybe not since it's a big project but if this module only works in toy projects and breaks big projects with no explanation then that is a serious problem.
https://nextjs.org/docs/messages/module-not-found
I upgraded to latest nextJS 14.1.0, but that didn't help.
I tried adding this to my application at the top layout.jsx layer:
Still no JOY.
When I go to the actual fs module in the node_modules folder I can find this readme:
Security holding package
This package name is not currently in use, but was formerly occupied by another package. To avoid malicious use, npm is hanging on to the package name, but loosely, and we'll probably give it to you if you want it.
You may adopt this package by contacting support@npmjs.com and requesting the name.
There is no code in the module and it has the followng package.json
Now I didn't pull this package in myself but it's someone's dependency but it has completely stopped development.