Hi, I downloaded the starter files and when I ran ‘npm i’ then ‘npm start’ in the redux-starter folder, it doesn’t run on localhost 9000. it doesn’t run anywhere.
What do you see after you run npm start
? Any output, any errors?
I am facing the same problem. after running npm start the terminal shows “compiled successfully” but nothing comes in the browser.
were you able to resolve the issue?
also where can i find the redux-starter code ?
Thanks in advance.
I found the tutorial on Youtube. The link to the file is there.
I have the same problem. My localhost page doesn’t load. There are some dependency issues going on. It asks if I want to use npm audit fix --force. I did but it still not working.
After running npm start command, this is what it says:
redux-starter@1.0.0 start
webpack-dev-server --config ./webpack.config.js
i 「wds」: Project is running at http://localhost:9000/
i 「wds」: webpack output is served from /
i 「wds」: Content not from webpack is served from C:\Users\tranp\Downloads\redux-starter (1)\redux-starter\dist
node:internal/crypto/hash:80
this[kHandle] = new _Hash(algorithm, xofLen, algorithmId, getHashCache());
^
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:80:19)
at Object.createHash (node:crypto:139:10)
at module.exports (C:\Users\tranp\Downloads\redux-starter (1)\redux-starter\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (C:\Users\tranp\Downloads\redux-starter (1)\redux-starter\node_modules\webpack\lib\NormalModule.js:417:16)
at handleParseError (C:\Users\tranp\Downloads\redux-starter (1)\redux-starter\node_modules\webpack\lib\NormalModule.js:471:10)
at C:\Users\tranp\Downloads\redux-starter (1)\redux-starter\node_modules\webpack\lib\NormalModule.js:503:5
at C:\Users\tranp\Downloads\redux-starter (1)\redux-starter\node_modules\webpack\lib\NormalModule.js:358:12
at C:\Users\tranp\Downloads\redux-starter (1)\redux-starter\node_modules\loader-runner\lib\LoaderRunner.js:373:3
at iterateNormalLoaders (C:\Users\tranp\Downloads\redux-starter (1)\redux-starter\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
at Array. (C:\Users\tranp\Downloads\redux-starter (1)\redux-starter\node_modules\loader-runner\lib\LoaderRunner.js:205:4) {
opensslErrorStack: [
‘error:03000086:digital envelope routines::initialization error’,
‘error:0308010C:digital envelope routines::unsupported’
],
library: ‘digital envelope routines’,
reason: ‘unsupported’,
code: ‘ERR_OSSL_EVP_UNSUPPORTED’
}
Node.js v20.12.1
PS C:\Users\tranp\Downloads\redux-starter (1)\redux-starter> npm start
redux-starter@1.0.0 start
webpack-dev-server --config ./webpack.config.js
i 「wds」: Project is running at http://localhost:9000/
i 「wds」: webpack output is served from /
i 「wds」: Content not from webpack is served from C:\Users\tranp\Downloads\redux-starter (1)\redux-starter\dist
node:internal/crypto/hash:80
this[kHandle] = new _Hash(algorithm, xofLen, algorithmId, getHashCache());
^
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:80:19)
at Object.createHash (node:crypto:139:10)
at module.exports (C:\Users\tranp\Downloads\redux-starter (1)\redux-starter\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (C:\Users\tranp\Downloads\redux-starter (1)\redux-starter\node_modules\webpack\lib\NormalModule.js:417:16)
at handleParseError (C:\Users\tranp\Downloads\redux-starter (1)\redux-starter\node_modules\webpack\lib\NormalModule.js:471:10)
at C:\Users\tranp\Downloads\redux-starter (1)\redux-starter\node_modules\webpack\lib\NormalModule.js:503:5
at C:\Users\tranp\Downloads\redux-starter (1)\redux-starter\node_modules\webpack\lib\NormalModule.js:358:12
at C:\Users\tranp\Downloads\redux-starter (1)\redux-starter\node_modules\loader-runner\lib\LoaderRunner.js:373:3
at iterateNormalLoaders (C:\Users\tranp\Downloads\redux-starter (1)\redux-starter\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
at Array. (C:\Users\tranp\Downloads\redux-starter (1)\redux-starter\node_modules\loader-runner\lib\LoaderRunner.js:205:4) {
opensslErrorStack: [
‘error:03000086:digital envelope routines::initialization error’,
‘error:0308010C:digital envelope routines::unsupported’
],
library: ‘digital envelope routines’,
reason: ‘unsupported’,
code: ‘ERR_OSSL_EVP_UNSUPPORTED’
}
Node.js v20.12.1
Here’s the answer from Polycozy
After you run npm i
, install the latest webpack:
npm install webpack@latest webpack-cli@latest webpack-dev-server@latest
,
and then, modify the “webpack.config.js”:
devServer: {
contentBase: path.join(__dirname, "dist"),
port: 9000
}
change to
devServer: {
static: {
directory: path.join(__dirname, "dist")
},
port: 9000
}
And it’s done. Now you visit http://localhost:9000/ to preview the webpage.