christopher4lis / canvas-boilerplate

An HTML5 canvas boilerplate with ES6 and live-reloading with BrowserSync.
444 stars 353 forks source link

Project wont start at all. #24

Open MrCaira opened 2 years ago

MrCaira commented 2 years ago

The project wont work at all for me, using npm start prompts following error on Windows 11.

I freshly installed nodejs less than 1 hour ago, on a clean Windows 11 system. Running node v18.4.0. Just cloned and did npm install, and have not touched files in between or after at all.

Regular expression denial of service in glob-parent - https://github.com/advisories/GHSA-ww39-953v-wcq6
PS D:\Development\Web Games\canvas-boilerplate> npm start

> canvas-template@1.0.0 start
> webpack --config webpack.config.js

webpack is watching the files…

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (D:\Development\Web Games\canvas-boilerplate\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (D:\Development\Web Games\canvas-boilerplate\node_modules\webpack\lib\NormalModule.js:417:16)
    at handleParseError (D:\Development\Web Games\canvas-boilerplate\node_modules\webpack\lib\NormalModule.js:471:10)
    at D:\Development\Web Games\canvas-boilerplate\node_modules\webpack\lib\NormalModule.js:503:5
    at D:\Development\Web Games\canvas-boilerplate\node_modules\webpack\lib\NormalModule.js:358:12
    at D:\Development\Web Games\canvas-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (D:\Development\Web Games\canvas-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at iterateNormalLoaders (D:\Development\Web Games\canvas-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
    at D:\Development\Web Games\canvas-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:236:3
    at runSyncOrAsync (D:\Development\Web Games\canvas-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:130:11)
    at iterateNormalLoaders (D:\Development\Web Games\canvas-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:232:2)
    at Array.<anonymous> (D:\Development\Web Games\canvas-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
    at Storage.finished (D:\Development\Web Games\canvas-boilerplate\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
    at D:\Development\Web Games\canvas-boilerplate\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
    at D:\Development\Web Games\canvas-boilerplate\node_modules\graceful-fs\graceful-fs.js:115:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
node:internal/crypto/hash:67
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (D:\Development\Web Games\canvas-boilerplate\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (D:\Development\Web Games\canvas-boilerplate\node_modules\webpack\lib\NormalModule.js:417:16)
    at handleParseError (D:\Development\Web Games\canvas-boilerplate\node_modules\webpack\lib\NormalModule.js:471:10)
    at D:\Development\Web Games\canvas-boilerplate\node_modules\webpack\lib\NormalModule.js:503:5
    at D:\Development\Web Games\canvas-boilerplate\node_modules\webpack\lib\NormalModule.js:358:12
    at D:\Development\Web Games\canvas-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (D:\Development\Web Games\canvas-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at iterateNormalLoaders (D:\Development\Web Games\canvas-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
    at D:\Development\Web Games\canvas-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:236:3
    at context.callback (D:\Development\Web Games\canvas-boilerplate\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
    at D:\Development\Web Games\canvas-boilerplate\node_modules\babel-loader\lib\index.js:59: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.4.0
PS D:\Development\Web Games\canvas-boilerplate>
thomasjvu commented 1 year ago

Use Git Bash Navigate to the boilerplate directory Use this command: export NODE_OPTIONS=--openssl-legacy-provider Then it should work

yibinjia commented 1 year ago

Use Git Bash Navigate to the boilerplate directory Use this command: export NODE_OPTIONS=--openssl-legacy-provider Then it should work

This command is for Linux/mac os, however $env:NODE_OPTIONS = "--openssl-legacy-provider works in windows.

wasiuddinmansoori1 commented 1 year ago

after applying your code its coming like that

image

thomasjvu commented 1 year ago

after applying your code its coming like that

image

You have to end the quote for "--openssl-legacy-provider"

wasiuddinmansoori1 commented 1 year ago

$env:NODE_OPTIONS = "--openssl-legacy-provider

You Are Great! Thankyou Very Much Brother Thanks A Lot @thomasjvu

DivinPrince commented 1 year ago

thanks @thomasjvu

Z-Hp commented 1 year ago

It's not working for me. I used npm install and then I got this error:

25 packages are looking for funding runnpm fund` for details

38 vulnerabilities (8 moderate, 24 high, 6 critical)

To address all issues, run: npm audit fix

Run npm audit for details.`

vfa-linhnm commented 12 months ago

@Z-Hp just ignore and start it when i use yarn it alert info This module is OPTIONAL, you can safely ignore this error

TheKid7878 commented 10 months ago

Strange. It opens up a tab for me saying "localhost:3000", yet the tab refuses to connect. When I inspect, it says "non-JS module files deprecated". Does this suggest its a network problem?? Then that's weird, because I have totally normal network.

aravind-virtualTE commented 5 months ago

people should upgrade the packages "@babel/core": "^7.24.5", "@babel/preset-env": "^7.24.5", "babel-loader": "^9.1.3", "browser-sync": "^2.29.3", "browser-sync-webpack-plugin": "^2.3.0", "file-loader": "^6.2.0", "html-webpack-plugin": "^5.6.0", "prettier": "^3.2.5", "webpack": "^5.91.0", "webpack-cli": "^5.1.4"