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

Cannot launch with node 18.12 #3

Open
Djones4822 opened this issue Nov 23, 2022 · 0 comments
Open

Cannot launch with node 18.12 #3

Djones4822 opened this issue Nov 23, 2022 · 0 comments

Comments

@Djones4822
Copy link

Installing with node 18.12 LTS reports 42 vulnerabilities (9 moderate, 27 high, 6 critical)

C:\Users\david\Documents\Programming\react-with-typescript-course>npm install
npm WARN old lockfile 
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.       
npm WARN old lockfile 
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile 
npm WARN deprecated [email protected]: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: 3.x is no longer supported
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: This version of 'buffer' is out-of-date. You must update to v4.9.2 or newer
npm WARN deprecated [email protected]: core-js-pure@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js-pure.

added 771 packages, and audited 772 packages in 12s

42 vulnerabilities (9 moderate, 27 high, 6 critical)

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

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

When trying to launch we get errors due to the crypto package

C:\Users\david\Documents\Programming\react-with-typescript-course>npm run start

> [email protected] start
> webpack-dev-server

i 「wds」: Project is running at http://localhost:8080/
i 「wds」: webpack output is served from /
i 「wds」: Content not from webpack is served from C:\Users\david\Documents\Programming\react-with-typescript-course
i 「wds」: 404s will fallback to /index.html
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 (C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\webpack\lib\NormalModule.js:401:16)
    at handleParseError (C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\webpack\lib\NormalModule.js:452:10)
    at C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\webpack\lib\NormalModule.js:484:5
    at C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\webpack\lib\NormalModule.js:343:12
    at C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at iterateNormalLoaders (C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
    at C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\loader-runner\lib\LoaderRunner.js:236:3
    at runSyncOrAsync (C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\loader-runner\lib\LoaderRunner.js:130:11)
    at iterateNormalLoaders (C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\loader-runner\lib\LoaderRunner.js:232:2)
    at Array.<anonymous> (C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
    at Storage.finished (C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:43:16)
    at C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:79:9
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
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 (C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\webpack\lib\NormalModule.js:401:16)
    at handleParseError (C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\webpack\lib\NormalModule.js:452:10)
    at C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\webpack\lib\NormalModule.js:484:5
    at C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\webpack\lib\NormalModule.js:343:12
    at C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at iterateNormalLoaders (C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
    at C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\loader-runner\lib\LoaderRunner.js:236:3
    at context.callback (C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
    at C:\Users\david\Documents\Programming\react-with-typescript-course\node_modules\babel-loader\lib\index.js:55:71
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.12.1

Steps to reproduce:

  1. install node 18.12.1
  2. clone repo
  3. npm install
  4. npm run start

Additionally the react packages are a bit out of date. React 18 has some major changes, and reactRouter has breaking changes between v5 and v6.

I have an updated version that fixes all of this and also changes webpack to vite... I'd be happy to submit a PR under a separate branch, maybe Starter - node18 or something? Or maybe we leave the PR open under my fork and let the user choose? Or ignore me entirely :)

Thanks,
Dave

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