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

webpack examples fail locally on Node.js 18 (LTS) #686

Closed
MikeMcC399 opened this issue Dec 28, 2022 · 2 comments
Closed

webpack examples fail locally on Node.js 18 (LTS) #686

MikeMcC399 opened this issue Dec 28, 2022 · 2 comments

Comments

@MikeMcC399
Copy link
Collaborator

MikeMcC399 commented Dec 28, 2022

Problem description

The webpack examples report success (with a deprecation warning) when run on GitHub.

When they are run locally on Node.js 18, which is currently the Node.js active Long Term Support (LTS) version, they fail.

The associated action and source files are:

An example of the deprecation warning resulting from running on GitHub can be found in run 6303278763.

Steps to reproduce

Open a terminal window on a local clone of the repository:

cd examples/webpack
nvm use 18.12.1
npm ci
npm start

Note:
"Error: error:0308010C:digital envelope routines::unsupported"

Results for supported Node.js versions

Executing npm start gives:

Node.js for v9 and v10 examples
v14.21.1 Compiled successfully.
v16.18.1 DeprecationWarning [DEP0111]
Compiled successfully.
v18.12.1 Error: error:0308010C:digital envelope routines::unsupported

Expectation

Analysis

cypress-io/github-action/ currently always runs under Node.js 16.13.0 (see #642). Running under this version causes only a deprecation warning.

If a local test is being carried out on Node.js 18, this fails because the examples are using webpack v4, whereas a minimum version of webpack v5.61.0 is needed to support Node.js >= 17 .

"webpack": "4",
"webpack-cli": "3",
"webpack-dev-server": "3.11.0"

"webpack": "4",
"webpack-cli": "3",
"webpack-dev-server": "3.11.0"

Suggested fix

For

in webpack.config.js

bump

then add

  • a .gitignore file containing dist/.

References

@MikeMcC399
Copy link
Collaborator Author

I plan to submit a PR to resolve this issue and I will wait until there are no other conflicting PRs which would also modify the affected package-lock.json files.

@MikeMcC399
Copy link
Collaborator Author

MikeMcC399 commented Jan 6, 2023

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