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

Issues building with node v18.15.0 #1161

Closed
krausest opened this issue Jan 12, 2023 · 3 comments
Closed

Issues building with node v18.15.0 #1161

krausest opened this issue Jan 12, 2023 · 3 comments

Comments

@krausest
Copy link
Owner

This is a collection of the issues when building with node v18.13.0 (current LTS)
keyed/doz:

BUILDING  [ 'keyed', 'doz' ]
rm -rf  yarn.lock dist elm-stuff bower_components node_modules output
npm ci && npm run build-prod
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.

added 429 packages, and audited 430 packages in 7s

9 packages are looking for funding
  run `npm fund` for details

9 vulnerabilities (1 low, 7 high, 1 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues, run:
  npm audit fix --force

Run `npm audit` for details.

> js-framework-benchmark-doz@1.0.0 build-prod
> webpack --mode=production

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 module.exports (/home/stefan/js-framework-benchmark-node18/frameworks/keyed/doz/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/stefan/js-framework-benchmark-node18/frameworks/keyed/doz/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/home/stefan/js-framework-benchmark-node18/frameworks/keyed/doz/node_modules/webpack/lib/NormalModule.js:471:10)
    at /home/stefan/js-framework-benchmark-node18/frameworks/keyed/doz/node_modules/webpack/lib/NormalModule.js:503:5
    at /home/stefan/js-framework-benchmark-node18/frameworks/keyed/doz/node_modules/webpack/lib/NormalModule.js:358:12
    at /home/stefan/js-framework-benchmark-node18/frameworks/keyed/doz/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/home/stefan/js-framework-benchmark-node18/frameworks/keyed/doz/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at Array.<anonymous> (/home/stefan/js-framework-benchmark-node18/frameworks/keyed/doz/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/home/stefan/js-framework-benchmark-node18/frameworks/keyed/doz/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
    at /home/stefan/js-framework-benchmark-node18/frameworks/keyed/doz/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
    at /home/stefan/js-framework-benchmark-node18/frameworks/keyed/doz/node_modules/graceful-fs/graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
@krausest
Copy link
Owner Author

Same for keyed/ef-js.
Seems like export NODE_OPTIONS=--openssl-legacy-provider is needed for Node v18.

@krausest
Copy link
Owner Author

krausest commented Jan 12, 2023

keyed/lit & non-keyed/lit

BUILDING  [ 'keyed', 'lit' ]
rm -rf  yarn.lock dist elm-stuff bower_components node_modules output
npm ci && npm run build-prod

added 96 packages, and audited 97 packages in 2s

10 packages are looking for funding
  run `npm fund` for details

1 high severity vulnerability

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

> js-framework-benchmark-lit@2.0.0 build-prod
> rollup -c

Error loading `tslib` helper library.
[!] Error: Package subpath './package.json' is not defined by "exports" in /home/stefan/js-framework-benchmark-node18/frameworks/keyed/lit/node_modules/rollup-plugin-typescript2/node_modules/tslib/package.json
Error: Package subpath './package.json' is not defined by "exports" in /home/stefan/js-framework-benchmark-node18/frameworks/keyed/lit/node_modules/rollup-plugin-typescript2/node_modules/tslib/package.json
    at new NodeError (node:internal/errors:400:5)
    at exportsNotFound (node:internal/modules/esm/resolve:361:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:697:9)
    at resolveExports (node:internal/modules/cjs/loader:538:36)
    at Function.Module._findPath (node:internal/modules/cjs/loader:607:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1025:27)
    at Function.Module._load (node:internal/modules/cjs/loader:885:27)
    at Module.require (node:internal/modules/cjs/loader:1105:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/home/stefan/js-framework-benchmark-node18/frameworks/keyed/lit/node_modules/rollup-plugin-typescript2/src/tslib.ts:11:23)

node:child_process:960
    throw err;
    ^

Error: Command failed: npm ci && npm run build-prod
    at checkExecSyncError (node:child_process:885:11)
    at execSync (node:child_process:957:15)
    at Object.<anonymous> (/home/stefan/js-framework-benchmark-node18/rebuild-all.js:68:7)
    at Module._compile (node:internal/modules/cjs/loader:1218:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
    at Module.load (node:internal/modules/cjs/loader:1081:32)
    at Module._load (node:internal/modules/cjs/loader:922:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 49699,
  stdout: null,
  stderr: null
}

Bumping dependencies resolves this issue.

@krausest krausest changed the title Issues building with node v18.13.0 Issues building with node v18.15.0 Mar 11, 2023
@krausest
Copy link
Owner Author

The build currently works

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