issue generating build for the frontend.
kriyanshii opened this issue · 3 comments
kriyanshii commented
while running this in the frontend directory:
npm run build
the output was.
> > frontend@2.3.7 build
> > REACT_APP_LOCAL_URL= react-scripts build
>
> 'REACT_APP_LOCAL_URL' is not recognized as an internal or external command,
> operable program or batch file.
When I removed REACT_APP_LOCAL_URL from the build script and ran this command:
npm run build
> frontend@2.3.7 build
> react-scripts build
Creating an optimized production build...
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:133:10)
at module.exports (C:\Users\Kriyanshi Shah\OneDrive\Desktop\mljar-mercury\mercury\frontend\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (C:\Users\Kriyanshi Shah\OneDrive\Desktop\mljar-mercury\mercury\frontend\node_modules\webpack\lib\NormalModule.js:417:16)
at handleParseError (C:\Users\Kriyanshi Shah\OneDrive\Desktop\mljar-mercury\mercury\frontend\node_modules\webpack\lib\NormalModule.js:471:10)
at C:\Users\Kriyanshi Shah\OneDrive\Desktop\mljar-mercury\mercury\frontend\node_modules\webpack\lib\NormalModule.js:503:5
at C:\Users\Kriyanshi Shah\OneDrive\Desktop\mljar-mercury\mercury\frontend\node_modules\webpack\lib\NormalModule.js:358:12
at C:\Users\Kriyanshi Shah\OneDrive\Desktop\mljar-mercury\mercury\frontend\node_modules\loader-runner\lib\LoaderRunner.js:373:3
at iterateNormalLoaders (C:\Users\Kriyanshi Shah\OneDrive\Desktop\mljar-mercury\mercury\frontend\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
at iterateNormalLoaders (C:\Users\Kriyanshi Shah\OneDrive\Desktop\mljar-mercury\mercury\frontend\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
at C:\Users\Kriyanshi Shah\OneDrive\Desktop\mljar-mercury\mercury\frontend\node_modules\loader-runner\lib\LoaderRunner.js:236:3
at runSyncOrAsync (C:\Users\Kriyanshi Shah\OneDrive\Desktop\mljar-mercury\mercury\frontend\node_modules\loader-runner\lib\LoaderRunner.js:130:11)
at iterateNormalLoaders (C:\Users\Kriyanshi Shah\OneDrive\Desktop\mljar-mercury\mercury\frontend\node_modules\loader-runner\lib\LoaderRunner.js:232:2)
at Array.<anonymous> (C:\Users\Kriyanshi Shah\OneDrive\Desktop\mljar-mercury\mercury\frontend\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
at Storage.finished (C:\Users\Kriyanshi Shah\OneDrive\Desktop\mljar-mercury\mercury\frontend\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
at C:\Users\Kriyanshi Shah\OneDrive\Desktop\mljar-mercury\mercury\frontend\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
C:\Users\Kriyanshi Shah\OneDrive\Desktop\mljar-mercury\mercury\frontend\node_modules\react-scripts\scripts\build.js:19
throw err;
^
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:133:10)
at module.exports (C:\Users\Kriyanshi Shah\OneDrive\Desktop\mljar-mercury\mercury\frontend\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (C:\Users\Kriyanshi Shah\OneDrive\Desktop\mljar-mercury\mercury\frontend\node_modules\webpack\lib\NormalModule.js:417:16)
at C:\Users\Kriyanshi Shah\OneDrive\Desktop\mljar-mercury\mercury\frontend\node_modules\webpack\lib\NormalModule.js:452:10
at C:\Users\Kriyanshi Shah\OneDrive\Desktop\mljar-mercury\mercury\frontend\node_modules\webpack\lib\NormalModule.js:323:13
at C:\Users\Kriyanshi Shah\OneDrive\Desktop\mljar-mercury\mercury\frontend\node_modules\loader-runner\lib\LoaderRunner.js:367:11
at C:\Users\Kriyanshi Shah\OneDrive\Desktop\mljar-mercury\mercury\frontend\node_modules\loader-runner\lib\LoaderRunner.js:233:18
at context.callback (C:\Users\Kriyanshi Shah\OneDrive\Desktop\mljar-mercury\mercury\frontend\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
at C:\Users\Kriyanshi Shah\OneDrive\Desktop\mljar-mercury\mercury\frontend\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'
}
Node.js v18.16.0
pplonski commented
Hi @kriyanshishah,
Please try to install packages first:
yarn install
and build with
yarn local-build
If you would like to start development server locally please try:
yarn start
kriyanshii commented
$ yarn start
yarn run v1.22.19
warning ..\..\..\..\package.json: No license field
$ REACT_APP_LOCAL_URL="" react-scripts start
'REACT_APP_LOCAL_URL' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
pplonski commented
Maybe try to edit package.json
to remove setting of REACT_APP_LOCAL_URL
. I'm using Node 14.17.0
for development.