Skip to content

webpack/lib/node/NodeOutputFileSystem removed in Wepback 5 #435

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

Closed
JoshuaKGoldberg opened this issue Jul 2, 2019 · 1 comment · Fixed by #436
Closed

webpack/lib/node/NodeOutputFileSystem removed in Wepback 5 #435

JoshuaKGoldberg opened this issue Jul 2, 2019 · 1 comment · Fixed by #436

Comments

@JoshuaKGoldberg
Copy link
Contributor

JoshuaKGoldberg commented Jul 2, 2019

  • Operating System: Mac 10.14.5
  • Node Version: 8.9 (but it's not relevant to this issue)
  • NPM Version: Yarn 1.15.2
  • webpack Version: 5.0.0-alpha.17
  • webpack-dev-middleware Version: 3.7.0

Expected Behavior

Don't crash when starting a Webpack dev server.

Actual Behavior

Error: Cannot find module 'webpack/lib/node/NodeOutputFileSystem'
Require stack:
- ../node_modules/webpack-dev-middleware/lib/fs.js
- ../node_modules/webpack-dev-middleware/index.js
- ../node_modules/webpack-dev-server/lib/Server.js

Code

const NodeOutputFileSystem = require('webpack/lib/node/NodeOutputFileSystem');

const { mkdirp } = new NodeOutputFileSystem();

mkdirp in NodeOutputFileSystem is directly require("mkdirp") per #405. I think this issue would be fixed if fs.js directly had const mkdirp = require("mkdirp"); instead.

How Do We Reproduce?

Try out the Webpack 5 alpha: webpack/webpack#8537

Issue reported on that thread: webpack/webpack#8537 (comment)

@alexander-akait
Copy link
Member

Yes, you are right, PR welcome

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

Successfully merging a pull request may close this issue.

2 participants