What the agent does
Error: error:0308010C:digital envelope routines::unsupported is webpack 4 asking OpenSSL for the MD4 hash it uses for module ids, which the OpenSSL 3 inside current Node releases refuses by default. Every Vue CLI 4 project builds on webpack 4, so npm run build and npm run serve both stop with this error the day the Node version moves. The run starts with the failing build log, and the agent clones the repository into its own cloud sandbox.
In a Vue CLI app like hai-27/vue-store, package.json has @vue/cli-service and its babel, eslint, router and vuex plugins at ^4.1.0, vue at ^2.6.10, element-ui, vuex, vue-router, and eslint at ^5.16.0 with eslint-plugin-vue ^5.0.0 and babel-eslint; the version 1 lockfile resolves @vue/cli-service 4.1.1 and webpack 4.41.2. vue.config.js sets publicPath: './' and a dev-server proxy for /api, and .eslintrc.js names babel-eslint as the parser. There is no .nvmrc and no engines field, so the build runs on whatever Node the machine has.
The agent reproduces it on Node 22: npm run build fails in webpack's NormalModule.js with the OpenSSL error. The stopgap is NODE_OPTIONS=--openssl-legacy-provider, under which the same build completes with two bundle-size warnings and writes dist/. The agent puts that into the build and serve scripts as the first commit, so the team is unblocked, and labels it as the stopgap it is: it re-enables an algorithm OpenSSL turned off.
The fix is Vue CLI 5, which builds on webpack 5 and current OpenSSL. The agent moves @vue/cli-service and the four plugins to 5, and the build then fails on [eslint] ESLint is not a constructor, because CLI 5's lint plugin needs ESLint 7 or later. It upgrades eslint to 7, eslint-plugin-vue to 8 and replaces babel-eslint with @babel/eslint-parser in .eslintrc.js. eslint-plugin-vue 8 then reports rules the project never had, vue/multi-word-component-names on components named Error, About and Collect and vue/no-mutating-props on a list prop; the agent turns those two rules off in .eslintrc.js to keep the change mechanical, names them in the pull request, and the build completes on Node 22 without the flag, with webpack 5's own size warnings.
Start it with one API call
POST https://api.phoenix.so/o/{org}/sessions with this body:
{
"agent": "claude",
"input": "npm run build fails with Error: error:0308010C:digital envelope routines::unsupported. Reproduce it on current Node, first add the legacy OpenSSL provider to the build and serve scripts as a stopgap commit, then upgrade @vue/cli-service and its plugins to 5 and fix what that needs (ESLint 7 or later, eslint-plugin-vue 8, @babel/eslint-parser), turn off only the new lint rules that fail and list them, confirm the build passes without the flag, and open a pull request with the two commits explained.",
"resources": [
{
"url": "https://github.com/your-org/your-app"
}
]
}- Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
- Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
- Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.
What comes back
What comes back is a pull request with two commits. The first adds --openssl-legacy-provider to the scripts and nothing else. The second moves @vue/cli-service and its plugins to 5, eslint to 7, eslint-plugin-vue to 8, swaps the parser, turns off the two new rules in .eslintrc.js, updates the lockfile and removes the flag again. The description quotes the OpenSSL error and the ESLint constructor error, and shows the build passing on Node 22 with the warnings it still prints.
A reviewer checks the dist/ output against a build from before, in particular publicPath: './' and the file names element-ui's theme CSS and the fonts take, since webpack 5 handles assets differently, and decides whether the two lint rules stay off or the components get renamed. Merging only the first commit is a valid choice and the pull request says so.
If a dependency such as vue-markdown or element-ui does not build on webpack 5, the pull request names it with the error and stops at the stopgap commit rather than forcing a change; the session keeps every build output.
Run it on every Node version bump
Create an automation in the Project with this prompt and a github trigger on workflow_run.failure. When CI moves to a newer Node image and the build turns red, the run starts with the event after the prompt, reads the job log, and opens the pull request with the stopgap and the upgrade.
Pair it with pull_request.labeled and the label dependencies to catch the actions/setup-node or base-image bump on its own pull request, before main breaks; the run builds that branch and comments with the result.
The use case this job follows, with its automation and trigger: Fix a bug from an alert.
Why run it on Rush?
The error is in node_modules/webpack, not in the project, and the right fix depends on the whole toolchain: CLI version, ESLint major, parser, and plugin rules. A Rush run tries each step in its own sandbox on the Node version that broke the build, keeps every error in order, and opens a pull request whose two commits separate the unblock from the upgrade.
Teams with several Vue CLI 4 apps hit this on the same day. Runs go in parallel, one per repository, each with its own stopgap commit, its own upgrade attempt and its own build output, and each pull request names what it had to turn off so the reviewer decides with the facts in front of them.
Frequently asked questions
Is --openssl-legacy-provider safe to keep?
It re-enables MD4 inside the build process only; it does not change the application. It works until Node drops the flag, which is why the pull request treats it as the first commit and not the fix.
Why does the Vue CLI 5 upgrade touch ESLint?
@vue/cli-plugin-eslint 5 uses eslint-webpack-plugin, which constructs ESLint from the eslint package, a class that exists from ESLint 7. With eslint 5 the build fails with ESLint is not a constructor. eslint-plugin-vue 8 and @babel/eslint-parser follow for the same reason.
Can I migrate to Vite instead?
Yes, and for a Vue 2 app that is a separate, larger change: vue.config.js, the proxy, and publicPath have Vite equivalents, but it is a new toolchain rather than an upgrade. The pull request keeps the project on Vue CLI and notes Vite as the next step if the team wants it.
Why turn lint rules off instead of fixing the components?
Renaming Error, About and Collect changes routes and imports, and the prop mutation is a behaviour question for the component's author. The pull request keeps the change mechanical, lists the two rules and the files that triggered them, and leaves the design decision with the reviewer.
More Vue CLI jobs
More jobs like this: Fix a bug from an alert
- Fix a Broken Docker Build (Docker)
- Fix "docker-compose: command not found" in GitHub Actions (GitHub Actions)
- Fix `Call to undefined function each()` on PHP 8 (PHP)
- Fix "'xml.etree.ElementTree.Element' object has no attribute 'getchildren'" in Python 3.9+ (ElementTree)
- Fix "TypeError: db.collection(...).ensureIndex is not a function" after a MongoDB driver upgrade (MongoDB Node.js driver)