OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Yarn start not working | error `ERR_PACKAGE_PATH_NOT_EXPORTED'

  • Thread starter Thread starter Abhishek Hari
  • Start date Start date
A

Abhishek Hari

Guest
I have been trying to make this React App, but when I try to do yarn start it shows the following error message:

Code:
yarn run v1.22.17
$ react-scripts start
node:internal/modules/cjs/loader:488
      throw e;
      ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in /home/abhishek/Documents/Code/weather-react/weather-react/node_modules/postcss-safe-parser/node_modules/postcss/package.json
    at new NodeError (node:internal/errors:371:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:429:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:683:3)
    at resolveExports (node:internal/modules/cjs/loader:482:36)
    at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/abhishek/Documents/Code/weather-react/weather-react/node_modules/postcss-safe-parser/lib/safe-parser.js:1:17) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Node.js v17.2.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

How do I fix this?

This is what it shows now:

Code:
Starting the development server...

/home/abhishek/Documents/Code/weather-react/weather-react/node_modules/react-scripts/scripts/start.js:19
  throw err;
  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:130:10)
    at module.exports (/home/abhishek/Documents/Code/weather-react/weather-react/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/abhishek/Documents/Code/weather-react/weather-react/node_modules/webpack/lib/NormalModule.js:417:16)
    at /home/abhishek/Documents/Code/weather-react/weather-react/node_modules/webpack/lib/NormalModule.js:452:10
    at /home/abhishek/Documents/Code/weather-react/weather-react/node_modules/webpack/lib/NormalModule.js:323:13
    at /home/abhishek/Documents/Code/weather-react/weather-react/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /home/abhishek/Documents/Code/weather-react/weather-react/node_modules/loader-runner/lib/LoaderRunner.js:233:18
    at context.callback (/home/abhishek/Documents/Code/weather-react/weather-react/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at /home/abhishek/Documents/Code/weather-react/weather-react/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 v17.2.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

<p>I have been trying to make this React App, but when I try to do <code>yarn start</code> it shows the following error message:</p>
<pre><code>yarn run v1.22.17
$ react-scripts start
node:internal/modules/cjs/loader:488
throw e;
^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in /home/abhishek/Documents/Code/weather-react/weather-react/node_modules/postcss-safe-parser/node_modules/postcss/package.json
at new NodeError (node:internal/errors:371:5)
at throwExportsNotFound (node:internal/modules/esm/resolve:429:9)
at packageExportsResolve (node:internal/modules/esm/resolve:683:3)
at resolveExports (node:internal/modules/cjs/loader:482:36)
at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/abhishek/Documents/Code/weather-react/weather-react/node_modules/postcss-safe-parser/lib/safe-parser.js:1:17) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Node.js v17.2.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
</code></pre>
<p>How do I fix this?</p>
<p>This is what it shows now:</p>
<pre><code>Starting the development server...

/home/abhishek/Documents/Code/weather-react/weather-react/node_modules/react-scripts/scripts/start.js:19
throw err;
^

Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at module.exports (/home/abhishek/Documents/Code/weather-react/weather-react/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/home/abhishek/Documents/Code/weather-react/weather-react/node_modules/webpack/lib/NormalModule.js:417:16)
at /home/abhishek/Documents/Code/weather-react/weather-react/node_modules/webpack/lib/NormalModule.js:452:10
at /home/abhishek/Documents/Code/weather-react/weather-react/node_modules/webpack/lib/NormalModule.js:323:13
at /home/abhishek/Documents/Code/weather-react/weather-react/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /home/abhishek/Documents/Code/weather-react/weather-react/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/home/abhishek/Documents/Code/weather-react/weather-react/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at /home/abhishek/Documents/Code/weather-react/weather-react/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 v17.2.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
</code></pre>
 

Latest posts

Top