C:\Users\else\Downloads\chrome-extension>yarn run start
yarn run v1.22.22
$ node utils/webserver.js
i 「wds」: Project is running at http://localhost:3000/
i 「wds」: webpack output is served from undefined
i 「wds」: Content not from webpack is served from C:\Users\else\Downloads\chrome-extension\build
node:internal/crypto/hash:79
this[kHandle] = new _Hash(algorithm, xofLen, algorithmId, getHashCache());
^
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:79:19)
at Object.createHash (node:crypto:139:10)
at module.exports (C:\Users\else\Downloads\chrome-extension\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (C:\Users\else\Downloads\chrome-extension\node_modules\webpack\lib\NormalModule.js:417:16)
at handleParseError (C:\Users\else\Downloads\chrome-extension\node_modules\webpack\lib\NormalModule.js:471:10)
at C:\Users\else\Downloads\chrome-extension\node_modules\webpack\lib\NormalModule.js:503:5
at C:\Users\else\Downloads\chrome-extension\node_modules\webpack\lib\NormalModule.js:358:12
at C:\Users\else\Downloads\chrome-extension\node_modules\loader-runner\lib\LoaderRunner.js:373:3
at iterateNormalLoaders (C:\Users\else\Downloads\chrome-extension\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
at Array. (C:\Users\else\Downloads\chrome-extension\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
at Storage.finished (C:\Users\else\Downloads\chrome-extension\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:43:16)
at C:\Users\else\Downloads\chrome-extension\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:79:9
at C:\Users\else\Downloads\chrome-extension\node_modules\graceful-fs\graceful-fs.js:90:16
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read/context:68:3) {
opensslErrorStack: [
'error:03000086:digital envelope routines::initialization error',
'error:0308010C:digital envelope routines::unsupported'
],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
Node.js v22.17.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
C:\Users\else\Downloads\chrome-extension>
Assistant
The error you're encountering, ERR_OSSL_EVP_UNSUPPORTED, is typically related to a compatibility issue between the version of Node.js you're using and the version of OpenSSL that certain packages in your project were built with or expect. This issue has become more common with the transition to newer versions of Node.js (especially from Node 17 onwards) that use OpenSSL 3.0, which introduces some breaking changes.
Here are a few potential solutions to resolve the ERR_OSSL_EVP_UNSUPPORTED error:
1. Downgrade Node.js to a Compatible Version
One straightforward solution is to downgrade your Node.js version to one that is compatible with your project's dependencies. For many projects, using Node.js version 16 or earlier should resolve the issue.
To downgrade Node.js:
You can use a version manager like nvm (Node Version Manager) if you're on a Unix-like system (Linux/MacOS).
bash
nvm install 16
nvm use 16
If you're on Windows, you can uninstall the current version of Node.js from the Control Panel, then download and install the desired version from the official Node.js download page.
2. Update Your Project's Dependencies
Sometimes, updating your project's dependencies to the latest versions can resolve compatibility issues, as newer versions of packages like webpack and others may have fixes for OpenSSL 3.0 compatibility.
To update dependencies:
Run yarn upgrade to update all dependencies to their latest versions according to the ranges specified in your package.json.
If that doesn't work, you might need to manually update specific packages. For example, to update webpack, you can run:
bash
yarn add webpack@latest
3. Use the --openssl-legacy-provider Flag
For Node.js versions that support it (some versions of Node.js 18 and possibly later), you can try running your application with the --openssl-legacy-provider flag. This flag allows Node.js to use the legacy OpenSSL provider, which can help with compatibility.
To do this, you'll need to modify your start script in package.json to include this flag. Here's an example:
Then, run your application as usual with yarn run start.
4. Clear node_modules and Reinstall
Sometimes, simply clearing the node_modules directory and reinstalling your dependencies can resolve issues due to corrupted or incompatible packages.
To do this:
Run yarn cache clean to clear the Yarn cache.
Delete the node_modules directory.
Run yarn install to reinstall your dependencies.
Additional Note
The first command you tried, clear, is not recognized because you're on Windows, and clear is a Unix-like command. The equivalent command on Windows is cls.