When I run my project everytime it shows the same error Anyone explain How i get rid of this error.
`PS C:\vervebot\trinethra_icms> npm run dev
> inventory-management#1.0.0 dev
> concurrently "npm run server" "npm run client"
[1]
[1] > inventory-management#1.0.0 client
[1] > npm start --prefix client
[1]
[0]
[0] > inventory-management#1.0.0 server
[0] > nodemon index.js
[0]
[0] [nodemon] 2.0.20
[0] [nodemon] to restart at any time, enter `rs`
[0] [nodemon] watching path(s): *.*
[0] [nodemon] watching extensions: js,mjs,json
[0] [nodemon] starting `node index.js`
[1]
[1] > client#0.1.0 start
[1] > react-scripts start
[1]
[0] Server running on PORT 5001
[1] [HPM] Proxy created: / -> http://localhost:5001
[1] [HPM] Proxy created: / -> https://dataservices.sypramsoftware.com/api
[1] i 「wds」: Project is running at http://192.168.1.11/
[1] i 「wds」: webpack output is served from
[1] i 「wds」: Content not from webpack is served from C:\vervebot\trinethra_icms\client\public
[1] i 「wds」: 404s will fallback to /
[1] Starting the development server...
[1]
[1] Error: error:0308010C:digital envelope routines::unsupported
[1] at new Hash (node:internal/crypto/hash:71:19)
[1] at Object.createHash (node:crypto:133:10)
[1] at module.exports (C:\vervebot\trinethra_icms\client\node_modules\webpack\lib\util\createHash.js:135:53)
[1] at NormalModule._initBuildHash (C:\vervebot\trinethra_icms\client\node_modules\webpack\lib\NormalModule.js:417:16)
[1] at handleParseError (C:\vervebot\trinethra_icms\client\node_modules\webpack\lib\NormalModule.js:471:10)
[1] at C:\vervebot\trinethra_icms\client\node_modules\webpack\lib\NormalModule.js:503:5
[1] at C:\vervebot\trinethra_icms\client\node_modules\webpack\lib\NormalModule.js:358:12
[1] at C:\vervebot\trinethra_icms\client\node_modules\loader-runner\lib\LoaderRunner.js:373:3
[1] at iterateNormalLoaders (C:\vervebot\trinethra_icms\client\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
[1] at iterateNormalLoaders (C:\vervebot\trinethra_icms\client\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
[1] C:\vervebot\trinethra_icms\client\node_modules\react-scripts\scripts\start.js:19
[1] throw err;
[1] ^
[1]
[1] Error: error:0308010C:digital envelope routines::unsupported
[1] at new Hash (node:internal/crypto/hash:71:19)
[1] at Object.createHash (node:crypto:133:10)
[1] at module.exports (C:\vervebot\trinethra_icms\client\node_modules\webpack\lib\util\createHash.js:135:53)
[1] at NormalModule._initBuildHash (C:\vervebot\trinethra_icms\client\node_modules\webpack\lib\NormalModule.js:417:16)
[1] at C:\vervebot\trinethra_icms\client\node_modules\webpack\lib\NormalModule.js:452:10
[1] at C:\vervebot\trinethra_icms\client\node_modules\webpack\lib\NormalModule.js:323:13
[1] at C:\vervebot\trinethra_icms\client\node_modules\loader-runner\lib\LoaderRunner.js:367:11
[1] at C:\vervebot\trinethra_icms\client\node_modules\loader-runner\lib\LoaderRunner.js:233:18
[1] at context.callback (C:\vervebot\trinethra_icms\client\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
[1] at C:\vervebot\trinethra_icms\client\node_modules\babel-loader\lib\index.js:59:103 {
[1] opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
[1] library: 'digital envelope routines',
[1] reason: 'unsupported',
[1] code: 'ERR_OSSL_EVP_UNSUPPORTED'
[1] }
[1]
[1] Node.js v18.12.1
[1] npm run client exited with code 1`
This is the Screenshot, It will help to get an clear idea.
I also use npm audit fix --force but i have to delete npm module and reinstall again. After doing all this i recive the same error again.
I suspect you have node.js 17 installed on your machine. This error occurs because node.js 17 uses OpenSSL3, which has changed the code for the initialization context of md family (including md4), and this is a breaking change.
you can solve this issue in several ways,
change your 'start' script in package.json in to
"start": "react-scripts --openssl-legacy-provider start"
or you can downgrade your node version, you can use nvm to quickly install and use different versions of node via the command line.
Related
After routine update of my server (Debian Sid) I am no longer able to start zero-ui development (actually I'm unable to start any nodejs development server):
zero#zdev:~/zero-ui$ ZU_CONTROLLER_TOKEN=whatever yarnpkg dev
[1] [nodemon] 2.0.15
[1] [nodemon] to restart at any time, enter `rs`
[1] [nodemon] watching path(s): *.*
[1] [nodemon] watching extensions: js,mjs,json
[1] [nodemon] starting `node ./bin/www`
[0] ℹ 「wds」: Project is running at http://192.168.7.122/
[0] ℹ 「wds」: webpack output is served from /app
[0] ℹ 「wds」: Content not from webpack is served from /home/zero/zero-ui/frontend/public
[0] ℹ 「wds」: 404s will fallback to /app/
[0] Starting the development server...
[0]
[0] Error: error:0308010C:digital envelope routines::unsupported
[0] at new Hash (node:internal/crypto/hash:67:19)
[0] at Object.createHash (node:crypto:130:10)
[0] at module.exports (/home/zero/zero-ui/node_modules/webpack/lib/util/createHash.js:135:53)
[0] at NormalModule._initBuildHash (/home/zero/zero-ui/node_modules/webpack/lib/NormalModule.js:417:16)
[0] at handleParseError (/home/zero/zero-ui/node_modules/webpack/lib/NormalModule.js:471:10)
[0] at /home/zero/zero-ui/node_modules/webpack/lib/NormalModule.js:503:5
[0] at /home/zero/zero-ui/node_modules/webpack/lib/NormalModule.js:358:12
[0] at /home/zero/zero-ui/node_modules/loader-runner/lib/LoaderRunner.js:373:3
[0] at iterateNormalLoaders (/home/zero/zero-ui/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
[0] at iterateNormalLoaders (/home/zero/zero-ui/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
[0] /home/zero/zero-ui/node_modules/react-scripts/scripts/start.js:19
[0] throw err;
[0] ^
[0]
[0] Error: error:0308010C:digital envelope routines::unsupported
[0] at new Hash (node:internal/crypto/hash:67:19)
[0] at Object.createHash (node:crypto:130:10)
[0] at module.exports (/home/zero/zero-ui/node_modules/webpack/lib/util/createHash.js:135:53)
[0] at NormalModule._initBuildHash (/home/zero/zero-ui/node_modules/webpack/lib/NormalModule.js:417:16)
[0] at /home/zero/zero-ui/node_modules/webpack/lib/NormalModule.js:452:10
[0] at /home/zero/zero-ui/node_modules/webpack/lib/NormalModule.js:323:13
[0] at /home/zero/zero-ui/node_modules/loader-runner/lib/LoaderRunner.js:367:11
[0] at /home/zero/zero-ui/node_modules/loader-runner/lib/LoaderRunner.js:233:18
[0] at context.callback (/home/zero/zero-ui/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
[0] at /home/zero/zero-ui/node_modules/react-scripts/node_modules/babel-loader/lib/index.js:59:103 {
[0] opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
[0] library: 'digital envelope routines',
[0] reason: 'unsupported',
[0] code: 'ERR_OSSL_EVP_UNSUPPORTED'
[0] }
[0] cd frontend && cross-env FAST_REFRESH=true yarn start exited with code 1
Note this does not seem to be the same problem I found discussed here and elsewhere on the internet (breaking change in node v16->v17) as I currently have:
zero#zdev:~/zero-ui$ node --version
v16.15.0
Note: I tried nonetheless adding NODE_OPTIONS=--openssl-legacy-provider to my options but this, rather unsurprisingly, does not work (/usr/bin/node: --openssl-legacy-provider is not allowed in NODE_OPTIONS which I take it means this option was added in v17 and is useless before the breaking change).
I strongly suspect some update in my debian sid is responsible, but I'm unable to understand which.
Note also this is specific to current Debian Sid: It is reproducible on a brand new install (using containers) and will not appear doing the exact same install on Debian Bookworm.
How can I overcome this?
TiA!
I have the sam problem. I've upgraded node.js to 17.7.2 and run into this error. Then upgraded to 18.4 and still got the error. Then using the legacy option - without success. Then downgraded node.js to 16.15.1, tried to up- and downgrade the webpack (4.46 => 5.63 => 4.46) but I got still the error. Even an uninstallation of node.js, removing all the cache folders and a brand new installation of node.js hadn't helped.
What I absolutely don't understand is, that the last line after the error message is "Node.js v17.7.2" which is definitely NOT on my system.
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:135:10)
at module.exports (C:\Users\pauly\repos\sources\dev\nuxt\test-app\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (C:\Users\pauly\repos\sources\dev\nuxt\test-app\node_modules\webpack\lib\NormalModule.js:417:16)
at handleParseError (C:\Users\pauly\repos\sources\dev\nuxt\test-app\node_modules\webpack\lib\NormalModule.js:471:10)
at C:\Users\pauly\repos\sources\dev\nuxt\test-app\node_modules\webpack\lib\NormalModule.js:503:5
at C:\Users\pauly\repos\sources\dev\nuxt\test-app\node_modules\webpack\lib\NormalModule.js:358:12
at C:\Users\pauly\repos\sources\dev\nuxt\test-app\node_modules\webpack\node_modules\loader-runner\lib\LoaderRunner.js:373:3
at iterateNormalLoaders (C:\Users\pauly\repos\sources\dev\nuxt\test-app\node_modules\webpack\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
at Array.<anonymous> (C:\Users\pauly\repos\sources\dev\nuxt\test-app\node_modules\webpack\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
at Storage.finished (C:\Users\pauly\repos\sources\dev\nuxt\test-app\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
at C:\Users\pauly\repos\sources\dev\nuxt\test-app\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
at C:\Users\pauly\repos\sources\dev\nuxt\test-app\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'
}
Node.js v17.7.2
This whole issue started with "npx create-nuxt-app", simply that - as I tried to create my nuxt application. What a mess.
After running the install script, the server starts and serves a page displaying the same text after the 'Failed to compile line.'
I'm running Windows 10 and auto update just updated my pc today, right before I did the create-react-express install.
PS H:\mern-passport> npm start
> mern#1.0.0 start H:\mern-passport
> if-env NODE_ENV=production && npm run start:prod || npm run start:dev
> mern#1.0.0 start:dev H:\mern-passport
> concurrently "nodemon --ignore 'client/*'" "npm run client"
[0] [nodemon] 1.19.4
[0] [nodemon] to restart at any time, enter `rs`
[0] [nodemon] watching dir(s): *.*
[0] [nodemon] watching extensions: js,mjs,json
[0] [nodemon] starting `node server.js`
[0] API server now on port 3001!
[1]
[1] > mern#1.0.0 client H:\mern-passport
[1] > cd client && npm run start
[1]
[1]
[1] > mern#0.1.0 start H:\mern-passport\client
[1] > react-scripts start
[1]
[1] Starting the development server...
[1]
[1] Failed to compile.
[1]
[1] ./src/index.css (./node_modules/css-loader??ref--6-oneOf-3-1!./node_modules/postcss-loader/src??postcss!./src/index.css)
[1] Error: Package exports for 'H:\mern-passport\client\node_modules\autoprefixer\node_modules\kleur' do not define a valid './colors' target
[0] Error: ENOENT: no such file or directory, stat 'H:\mern-passport\client\build\index.html'
[0] Error: ENOENT: no such file or directory, stat 'H:\mern-passport\client\build\index.html'
Seems to be an issue with autoprefixer latest version. I referred https://github.com/postcss/autoprefixer/issues/1328 and tried downgrading autoprefixer in my project and it works now.
Try:
npm install autoprefixer#9.8.0
Happy coding!
I also faced this problem. And it looks like a problem with autoprefixer version, so i changed the version.
npm install autoprefixer#9.8.0
I tried this, and it works perfectly.
I was running into this issue too. I installed yarn and created a new project with the npx create-react-app command and this fixed the issue.
I found one project on GitHub darkwire and wanted to install it and play with it. Firstly I tried to install it from windows. I installed Node.js and Yarn and I got errors with the command: yarn dev
`C:\darkwire.io-master>yarn dev
yarn run v1.21.1
$ concurrently 'cd client && yarn start' 'cd server && yarn dev'
[0] 'c' is not recognized as an internal or external command,
[0] operable program or batch file.
[1] 'client' is not recognized as an internal or external command,
[1] operable program or batch file.
[0] c exited with code 1
[1] client exited with code 1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.`
My next step was to try it in ubuntu 19.10, firstly I installed again Node.js and Yarn and again used: yarn dev. I got an error but now was open site and it not working, just say "Disconnected"
```qq#ubuntu:~/Downloads/darkwire.io-master$ yarn dev
yarn run v1.21.1
$ concurrently 'cd client && yarn start' 'cd server && yarn dev'
$ nodemon src/index.js --exec babel-node
$ react-scripts start
[1] [nodemon] 1.19.0
[1] [nodemon] to restart at any time, enter `rs`
[1] [nodemon] watching: *.*
[1] [nodemon] starting `babel-node src/index.js`
[1] Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`
[1] Checking for inactive rooms...
[1] Darkwire is online at port 3001
[1] events.js:183
[1] throw er; // Unhandled 'error' event
[1] ^
[1]
[1] Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
[1] [nodemon] app crashed - waiting for file changes before starting...
[0] Starting the development server...
[0]
[0] Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`
[0] Compiled successfully!
[0]
[0] You can now view darkwire-client in the browser.
[0]
[0] Local: http://localhost:3000/
[0] On Your Network: http://175.124.13.111:3000/
[0]
[0] Note that the development build is not optimized.
[0] To create a production build, use yarn build.
[0]
```
screenshot
I think maybe I have the wrong version Node.js and try install 9.x version, download again project and try again, it not help, try change port from 3001 to 3000, not help.
From their README.md
Darkwire Server
Darkwire server is a Node.js application that requires redis.
So please install a compatible redis server. Redis tutorial
I wanted a mean starter kit so that I can build my app. Then I got this from github. I just made it setup then made npm install and then made npm start. But it showed me several errors like this
[nodemon] 1.12.1
[0] [nodemon] to restart at any time, enter `rs`
[0] [nodemon] watching: *.*
[0] [nodemon] starting `node server.js`
[0] ✓ App is running at http://localhost:3000 in development mode
[0] Press CTRL-C to stop
[0]
[1] Cannot read property 'config' of null
[1] TypeError: Cannot read property 'config' of null
[1] at Class.run (/Users/Sites/tryouts/mean/node_modules/#angular/cli/tasks/serve.js:51:63)
[1] at check_port_1.checkPort.then.port (/Users/Sites/tryouts/mean/node_modules/#angular/cli/commands/serve.js:123:26)
[1] at <anonymous>
[1] at process._tickCallback (internal/process/next_tick.js:188:7)
So can someone tell me how to make this working? Any help and suggestions will be really appreciable.
I installed the seed app here: https://github.com/moizKachwala/Angular2-expressjs-mongoose-gulp-node-typescript
I'm trying to run npm start but the server is not being created and started.
I thought maybe this line "(node:16596) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version" was the issue and I found that on SO its was suggested to make sure you have latest npm which I do.
NOTE: The gulp script is supposed to create the dist folder where it will place all the js files but the dist folder is not being created so the gulp script is failing somewhere...
What else could it be?
c:\work\angular\pricecompare1>npm start
> angular2-express#1.0.0 start c:\work\angular\pricecompare1
> concurrent --kill-others "gulp watch" "gulp start"
[1] [09:35:54]
[0] [09:35:54] Requiring external module ts-node/register
[1] Requiring external module ts-node/register
[0] (node:16596) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
[1] (node:17124) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
[0] [09:35:55]
[0] Using gulpfile c:\work\angular\pricecompare1\gulpfile.ts
[1] [09:35:55] Using gulpfile c:\work\angular\pricecompare1\gulpfile.ts
[0] [09:35:55]
[0] Starting 'watch'...
[1] [09:35:55]
[1] Starting 'start'...
[1] [09:35:55]
[1] Finished 'start' after 1.88 ms
[1] [09:35:55] [nodemon] 1.10.0
[1] [09:35:55] [nodemon] to restart at any time, enter `rs`
[1] [09:35:55] [nodemon] watching: *.*
[1] [09:35:55] [nodemon] starting `node dist/server/server.js`
[0] [09:35:55] Finished 'watch' after 32 ms
[1] module.js:442
[1] throw err;
[1] ^
[1]
[1] Error: Cannot find module 'c:\work\angular\pricecompare1\dist\server\server.js'
[1] at Function.Module._resolveFilename (module.js:440:15)
[1] at Function.Module._load (module.js:388:25)
[1] at Module.runMain (module.js:575:10)
[1] at run (bootstrap_node.js:352:7)
[1] at startup (bootstrap_node.js:144:9)
[1] at bootstrap_node.js:467:3
[1] [09:35:55] [nodemon] app crashed - waiting for file changes before starting...
in your package.json file find start command and reference your server.js with correct directory
pricecompare1\dist\server\server.js