Describe the bug
HTTPS=true spits this error: EROFS: read-only filesystem, open '/node_modules/webpack-dev-server/ssl/server.pem' after migrating to yarn 2.
To Reproduce
From a fresh CRA install, prepend HTTPS=true flag in the scripts.start from your package.json.
It should now look like this
scripts: {
start: "HTTPS=true react-scripts start"
}
To clarify, yarn starts perfectly without HTTPS=true, I'm suspecting webpack-dev-server creates a self-signed certificate and writes it into its own directory, except they're all now read-only.
Environment if relevant (please complete the following information):
This has been solved by adding a meta dependency on package.json:
"dependenciesMeta": {
"webpack-dev-server": {
"unplugged": true
}
}
From: https://next.yarnpkg.com/configuration/manifest/#dependenciesMeta.unplugged
This still produces the same error for us, yarn=2.0.0-rc.29
2.0.0-rc.31
yarn start  ✔  10514  21:47:09
[sudo] Passwort für arpu:
ℹ 「wds」: Generating SSL Certificate
Error: EROFS: read-only filesystem, open '/node_modules/webpack-dev-server/ssl/server.pem'
@jacklaurencegaray should this not be reopened ?
Probably not, since it's not actionable by our team.
Webpack-dev-server seems to be mutating its own folder, which is heavily discouraged. Ideally the certificate should be stored in a node_modules dot-folder (such as node_modules/.certs), but in the meantime you can unplug the package by following the advice exposed in https://github.com/yarnpkg/berry/issues/815#issuecomment-579143792.
Did someone already open an issue for this on webpack-dev-server repo?
Most helpful comment
This still produces the same error for us,
yarn=2.0.0-rc.29