Topic: After installing pro version npm start fails

technoHippy pro asked 11 months ago


Expected behavior

Should run in browser after installing npm modules and run

Actual behavior

Server wont start. Does anyone have any tips on how to get it running?

Resources (screenshots, code snippets etc.)

Starting the development server...

Error: error:0308010C:digital envelope routines::unsupported at new Hash 
(node:internal/crypto/hash:69:19) at Object.createHash (node:crypto:138:10) at            
module.exports (C:\\Users\\mikec\_Projects\\pro\\node\_modules\\webpack\\lib\\util  
\\createHash.js:135:53) at NormalModule.\_initBuildHash (C:\\Users\\mikec\_Project
\\pro\\node\_modules\\webpack\\lib\\NormalModule.js:417:16) at handleParseError
(C:\\Users\\mikec\_Projects\\pro\\node\_modules\\webpac        
\\lib\\NormalModule.js:471:10) at C:\\Users\\mikec\_Projects\\pro\\node\_module
\\webpack\\lib\\NormalModule.js:503:5 at C:\\Users\\mikec\_Projects\\pro\\nod
\_modules\\webpack\\lib\\NormalModule.js:358:12 at C:\\Users\\mikec\_Project
\\pro\\node\_modules\\loader-runner\\lib\\LoaderRunner.js:373:3 at
iterateNormalLoaders (C:\\Users\\mikec\_Projects\\pro\\node\_modules\\loader-runne
\\lib\\LoaderRunner.js:214:10) at iterateNormalLoaders (C:\\Users\\mikec\_Project
\\pro\\node\_modules\\loader-runner\\lib\\LoaderRunner.js:221:10)C:\\Users\\mike
\_Projects\\pro\\node\_modules\\react-scripts\\scripts\\start.js:19 throw err; ^

Error: error:0308010C:digital envelope routines::unsupported at new Hash
(node:internal/crypto/hash:69:19) at Object.createHash (node:crypto:138:10) at
module.exports (C:\\Users\\mikec\_Projects\\pro\\node\_modules\\webpack\\lib\\uti
\\createHash.js:135:53) at NormalModule.\_initBuildHash (C:\\Users\\mikec\_Project
\\pro\\node\_modules\\webpack\\lib\\NormalModule.js:417:16) at C:\\Users\\mike
\_Projects\\pro\\node\_modules\\webpack\\lib\\NormalModule.js:452:10 at C:\\User
\\mikec\_Projects\\pro\\node\_modules\\webpack\\lib\\NormalModule.js:323:13 at
C:\\Users\\mikec\_Projects\\pro\\node\_modules\\loader-runne
\\lib\\LoaderRunner.js:367:11 at C:\\Users\\mikec\_Projects\\pro\\node\_module
\\loader-runner\\lib\\LoaderRunner.js:233:18 at context.callback (C:\\Users\\mike
\_Projects\\pro\\node\_modules\\loader-runner\\lib\\LoaderRunner.js:111:13) at
C:\\Users\\mikec\_Projects\\pro\\node\_modules\\babel-loader\\lib\\index.js:59:103 {
opensslErrorStack: \[ 'error:03000086:digital envelope routines::initialization error' \],
library: 'digital envelope routines', reason: 'unsupported', code: 'ERR\_OSS
\_EVP\_UNSUPPORTED'}

Node.js v20.5.1

Ive tried running

export NODE_OPTIONS=--openssl-legacy-provider

That didn't have any effect.

Ive searched on stack overflow and found this and tried changing start command to:

"scripts": {
"start": "react-scripts --openssl-legacy-provider start",
"build": "react-scripts --openssl-legacy-provider build",
"test": "react-scripts test",
"eject": "react-scripts eject"

When that's added it seems like its compiling then returns

Failed to compile.

./src/pages/ChartsPage.js Module not found: Can't resolve 'react-chartjs-2' in 'C:\User
\mikec\_Projects\pro\src\pages'  

Then it stops. The file "ChartsPages.js" is there.


Mateusz Lazaru staff commented 11 months ago

Current error looks like your app is trying to find react-chartjs-2, but it's not installed module. Try to run npm i react-chartjs-2


technoHippy pro answered 11 months ago


Hi Mateusz, thanks for the reply. react-chatjs-2 is there, but its in:

"node_modules/mdbreact/node_modules/react-chartjs-2"

Should it be somewhere else?


Mateusz Lazaru staff commented 11 months ago

I see you're using older version of mdb - MDB4. Is this planned or you installed it accidentally? The name of current MDB5 package is mdb-react-ui-kit, and you can find the installation guide under the following link: https://mdbootstrap.com/docs/react/pro/installation/

If you installed older MDB4 intentionally, please answer a few additional questions. 1. Which version of node are you using? node -v 2. How to reproduce this problem?


technoHippy pro commented 11 months ago

Thanks Mateusz, I signed up a few years ago and unfortunately I can't access MDB5 unless I make another purchase.

I'm running nvm and have tried node 14, 18 & 20

I'm not 100% sure on how to reproduce this issue. I think it would reproduce if you installed the same version of MDB4 and ran the same version of node. I'm on windows 11 running VS code Using firefox


Mateusz Lazaru staff commented 11 months ago

I tried to reproduce the problem, but with no effect. I had a dependency problem with MDB4 v5.1.0, but updating to 5.2.0 resolved it. Node v14.21.3

The steps I went through:

  1. npx create-react-app
  2. lowered versions react, react-dom, to 17.0.0 testing library to 12.x.x
  3. removed node_modules and ran npm i
  4. npm i git+https://oauth2:ACCESS_TOKEN@git.mdbootstrap.com/mdb/react/re-pro.git

No error showed up in this scenario.

Please give it a try and let me know if it works.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB React
  • MDB Version: MDB5 5.1.0
  • Device: Lenovo Yoga 7i
  • Browser: firefox
  • OS: Windows 11
  • Provided sample code: No
  • Provided link: Yes