Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Introducing the Practice

Devontay Cross
Devontay Cross
11,118 Points

Every time I run 'npm start' in the terminal, I get an error and the page won't load. How can I fix this?

Here is the error that I keep getting and I have the latest version of VSCode, plus I've installed all of the dependancies. ... 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 (/Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/webpack/lib/util/createHash.js:90:53) at NormalModule._initBuildHash (/Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/webpack/lib/NormalModule.js:401:16) at handleParseError (/Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/webpack/lib/NormalModule.js:449:10) at /Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/webpack/lib/NormalModule.js:481:5 at /Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/webpack/lib/NormalModule.js:342:12 at /Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/loader-runner/lib/LoaderRunner.js:373:3 at iterateNormalLoaders (/Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/loader-runner/lib/LoaderRunner.js:214:10) at iterateNormalLoaders (/Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/loader-runner/lib/LoaderRunner.js:221:10) at /Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/loader-runner/lib/LoaderRunner.js:236:3 at runSyncOrAsync (/Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/loader-runner/lib/LoaderRunner.js:130:11) at iterateNormalLoaders (/Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/loader-runner/lib/LoaderRunner.js:232:2) at Array.<anonymous> (/Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/loader-runner/lib/LoaderRunner.js:205:4) at Storage.finished (/Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16) at /Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9 /Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/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 (/Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/webpack/lib/util/createHash.js:90:53) at NormalModule._initBuildHash (/Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/webpack/lib/NormalModule.js:401:16) at /Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/webpack/lib/NormalModule.js:433:10 at /Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/webpack/lib/NormalModule.js:308:13 at /Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/loader-runner/lib/LoaderRunner.js:367:11 at /Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/loader-runner/lib/LoaderRunner.js:233:18 at context.callback (/Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/loader-runner/lib/LoaderRunner.js:111:13) at /Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/babel-loader/lib/index.js:51:103 { opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], library: 'digital envelope routines', reason: 'unsupported', code: 'ERR_OSSL_EVP_UNSUPPORTED' } ...

2 Answers

Travis Alstrand
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Travis Alstrand
Treehouse Project Reviewer

Hey there Devontay Cross ! :wave:

I'm unable to replicate this issue which makes me thinks it has something to do with a node version issue possibly.

First, please ensure you've changed directories in your terminal to the correct folder

practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state

then run the commands

npm i
npm start

If you still encounter the same issue, I'm curious as to what version of Node you're using. If you type

node -v

in your terminal, what does it read?

I saw something online that it may be related to a Node.js and the OpenSSL library used by Webpack issue. We could try the following commands as a potential work-around, I'm not sure if this would work or not but may be worth a shot...

npm i webpack@latest
rm -rf node_modules
npm i
npm start

Things still ran on my end after trying these, but I'm not having the initial issue that you are so I can't be certain.

If you need to undo those last commands and don't want to delete the project files / redownload them you can run

npm uninstall webpack
rm -rf node_modules
npm i

to get back where you were before doing so.

Devontay Cross
Devontay Cross
11,118 Points

Hey Travis, thanks for answering me but its still not working for some reason, here is the error i get whenever I run 'npm start':

The Terminal
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 (/Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/webpack/lib/NormalModule.js:471:10)
    at /Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/webpack/lib/NormalModule.js:503:5
    at /Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/webpack/lib/NormalModule.js:358:12
    at /Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
/Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/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 (/Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/webpack/lib/NormalModule.js:417:16)
    at /Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/webpack/lib/NormalModule.js:452:10
    at /Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/webpack/lib/NormalModule.js:323:13
    at /Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/loader-runner/lib/LoaderRunner.js:233:18
    at context.callback (/Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at /Users/devontaycross/Documents/Documents - Devontay’s MacBook Air/Team Tree House/practice-state-in-react/1-introducing-the-practice/BEGIN/practice-state/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_OSSL_EVP_UNSUPPORTED'
}```
Devontay Cross
Devontay Cross
11,118 Points

Finally found the solution to the problem, I needed to update node and run a auditfix --force to get everything working properly. Thanks for the help!

Travis Alstrand
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Travis Alstrand
Treehouse Project Reviewer

I'm sorry I didn't see your reply in time but I'm so glad you got that figured out!! Nice job Devontay Cross !!! :thumbsup:

I'll remember this in case anyone else comes across this issue. Very well done!!