Unable to run microfrontends on Node 18
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.2k
- Forks
- 1.8k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 6
Description
Steps to reproduce
Use the latest Node 18
$ nvm use --lts
Run pnpm dev
$ pnpm install
$ pnpm dev
Observe SSL errors
@acme/storybook:dev: attention => Storybook now collects completely anonymous telemetry regarding usage.
@acme/storybook:dev: This information is used to shape Storybook's roadmap and prioritize features.
@acme/storybook:dev: You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
@acme/storybook:dev: https://storybook.js.org/telemetry
@acme/storybook:dev:
@acme/storybook:dev:
@acme/storybook:dev: info => Ignoring cached manager due to change in manager config
@acme/storybook:dev: ℹ 「wdm」: wait until bundle finished:
@acme/storybook:dev: (node:39035) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
@acme/storybook:dev: (Use `node --trace-warnings ...` to show where the warning was created)
@acme/storybook:dev: node:internal/crypto/hash:71
@acme/storybook:dev: this[kHandle] = new _Hash(algorithm, xofLen);
@acme/storybook:dev: ^
@acme/storybook:dev:
@acme/storybook:dev: Error: error:0308010C:digital envelope routines::unsupported
@acme/storybook:dev: at new Hash (node:internal/crypto/hash:71:19)
@acme/storybook:dev: at Object.createHash (node:crypto:133:10)
@acme/storybook:dev: at module.exports (examples/solutions/microfrontends/node_modules/.pnpm/webpack@4.46.0/node_modules/webpack/lib/util/createHash.js:135:53)
@acme/storybook:dev: at NormalModule._initBuildHash (examples/solutions/microfrontends/node_modules/.pnpm/webpack@4.46.0/node_modules/webpack/lib/NormalModule.js:417:16)
@acme/storybook:dev: at handleParseError (examples/solutions/microfrontends/node_modules/.pnpm/webpack@4.46.0/node_modules/webpack/lib/NormalModule.js:471:10)
@acme/storybook:dev: at examples/solutions/microfrontends/node_modules/.pnpm/webpack@4.46.0/node_modules/webpack/lib/NormalModule.js:503:5
@acme/storybook:dev: at examples/solutions/microfrontends/node_modules/.pnpm/webpack@4.46.0/node_modules/webpack/lib/NormalModule.js:358:12
@acme/storybook:dev: at examples/solutions/microfrontends/node_modules/.pnpm/loader-runner@2.4.0/node_modules/loader-runner/lib/LoaderRunner.js:373:3
@acme/storybook:dev: at iterateNormalLoaders (examples/solutions/microfrontends/node_modules/.pnpm/loader-runner@2.4.0/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
@acme/storybook:dev: at Array.<anonymous> (examples/solutions/microfrontends/node_modules/.pnpm/loader-runner@2.4.0/node_modules/loader-runner/lib/LoaderRunner.js:205:4) {
@acme/storybook:dev: opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
@acme/storybook:dev: library: 'digital envelope routines',
@acme/storybook:dev: reason: 'unsupported',
@acme/storybook:dev: code: 'ERR_OSSL_EVP_UNSUPPORTED'
@acme/storybook:dev: }
@acme/storybook:dev:
@acme/storybook:dev: Node.js v18.12.1
@acme/storybook:dev: ELIFECYCLE Command failed with exit code 1.
@acme/storybook:dev: ERROR: command finished with error: command (examples/solutions/microfrontends/packages/acme-storybook) pnpm run dev exited (1)
command (examples/solutions/microfrontends/packages/acme-storybook) pnpm run dev exited (1)
Tasks: 0 successful, 1 total
Cached: 0 cached, 1 total
Time: 17.849s
ERROR run failed: command exited (1)
ELIFECYCLE Command failed with exit code 1.
Workarounds
There are a couple of options to workarounds this:
- Use Node 16 which doesnt have the ssl issues
nvm use 16
- Workaround it https://stackoverflow.com/questions/69394632/webpack-build-failing-with-err-ossl-evp-unsupported
NODE_OPTIONS=--openssl-legacy-provider
- Resolve to webpack 5
+++ b/package.json
+ "resolutions" : {
+ "webpack": "^5.75.0"
}
Although this runs into another issue that might be due to vite:
@acme/storybook:dev: info => Loading presets
@acme/storybook:dev:
@acme/storybook:dev: attention => Storybook now collects completely anonymous telemetry regarding usage.
@acme/storybook:dev: This information is used to shape Storybook's roadmap and prioritize features.
@acme/storybook:dev: You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
@acme/storybook:dev: https://storybook.js.org/telemetry
@acme/storybook:dev:
@acme/storybook:dev: (node:43158) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
@acme/storybook:dev: (Use `node --trace-warnings ...` to show where the warning was created)
@acme/storybook:dev:
@acme/storybook:dev: info => Ignoring cached manager due to change in manager config
@acme/storybook:dev: unable to close vite server
...
@acme/storybook:dev: error Command failed with exit code 1.
@acme/storybook:dev: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@acme/storybook:dev: ERROR: command finished with error: command (examples/packages/acme-storybook) yarn run dev exited (1)
command (examples/packages/acme-storybook) yarn run dev exited (1)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in examples/solutions/microfrontends and inspect package.json, especially the webpack and Storybook-related dependencies shown in the report. Run pnpm install and pnpm dev with Node 18, then verify that the microfrontend development setup starts without ERR_OSSL_EVP_UNSUPPORTED or the reported Vite shutdown failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript, vite, webpack
- Domain
- build-system, frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100