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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nimble does not build with node 18 LTS #799

Closed
rajsite opened this issue Nov 1, 2022 · 1 comment
Closed

Nimble does not build with node 18 LTS #799

rajsite opened this issue Nov 1, 2022 · 1 comment
Assignees

Comments

@rajsite
Copy link
Member

rajsite commented Nov 1, 2022

馃Ч Tech Debt

Tried to npm run build the nimble repo with the latest Node LTS (v18.12.0) but the build fails with the following error:

> @ni/nimble-components@15.1.1 build-storybook
> build-storybook -o dist/storybook

info @storybook/html v6.5.10
info
info => Cleaning outputDir: C:\dev\github\nimble\packages\nimble-components\dist\storybook
info => Loading presets
info => Copying static files: C:\dev\github\nimble\packages\nimble-components\.storybook\public at C:\dev\github\nimble\packages\nimble-components\dist\storybook\
info => Loading custom manager config
info => Compiling manager..
info => Compiling preview..
info Addon-docs: using MDX1
info => Using implicit CSS loaders
info => Using default Webpack5 setup
10% building 0/1 entries 0/0 dependencies 0/0 modulesinfo => Loading custom manager config
node:internal/crypto/hash:71
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at BulkUpdateDecorator.hashFactory (C:\dev\github\nimble\node_modules\webpack\lib\util\createHash.js:145:18)
    at BulkUpdateDecorator.update (C:\dev\github\nimble\node_modules\webpack\lib\util\createHash.js:46:50)
    at OriginalSource.updateHash (C:\dev\github\nimble\node_modules\webpack\node_modules\webpack-sources\lib\OriginalSource.js:138:8)
    at NormalModule._initBuildHash (C:\dev\github\nimble\node_modules\webpack\lib\NormalModule.js:888:17)
    at handleParseResult (C:\dev\github\nimble\node_modules\webpack\lib\NormalModule.js:954:10)
    at C:\dev\github\nimble\node_modules\webpack\lib\NormalModule.js:1048:4
    at processResult (C:\dev\github\nimble\node_modules\webpack\lib\NormalModule.js:763:11)
    at C:\dev\github\nimble\node_modules\webpack\lib\NormalModule.js:827:5 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.12.0
npm ERR! Lifecycle script `build-storybook` failed with error:
npm ERR! Error: command failed
npm ERR!   in workspace: @ni/nimble-components@15.1.1
npm ERR!   at location: C:\dev\github\nimble\packages\nimble-components
npm ERR! Lifecycle script `build` failed with error:
npm ERR! Error: command failed
npm ERR!   in workspace: @ni/nimble-components@15.1.1
npm ERR!   at location: C:\dev\github\nimble\packages\nimble-components

Which seems to be related to webpack/webpack#14532

We may be able to get it to build with some npm update for a newer webpack version, but as-is with the current lock file it will fail to build unless you downgrade to node 16.

I did not test if this impacts clients using nimble (it likely does not impact them). I only tested as a nimble developer building the monorepo.

@rajsite rajsite added tech debt triage New issue that needs to be reviewed labels Nov 1, 2022
@m-akinc m-akinc removed the triage New issue that needs to be reviewed label Nov 8, 2022
@rajsite rajsite self-assigned this Nov 14, 2022
@rajsite
Copy link
Member Author

rajsite commented Feb 1, 2023

Looks like this was resolved by the dependency update in #1000, the error above is shown in the following closed issue storybookjs/storybook#18019

Validated in local build against node 18.3.0 and ci build: https://github.com/ni/nimble/actions/runs/4069291905/jobs/7008855783

@rajsite rajsite closed this as completed Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants