skip to Main Content

I have an error when I’m typing "npm run build", however, I made this project 4 month ago and there wasn’t error like that, now I need to my website. This is an error, that I’m receiving:

$ npm run build

[email protected] build
react-scripts build

node:internal/fs/utils:347
    throw err;
    ^

Error: UNKNOWN: unknown error, read
    at Object.readSync (node:fs:748:3)
    at tryReadSync (node:fs:448:20)
    at Object.readFileSync (node:fs:486:19)
    at C:UsersruslaOneDriveРабочий столSiteshonesttradinghonest-tradingnode_modulesreact-dev-utilsFileSizeReporter.js:139:29
    at Array.reduce (<anonymous>)
    at C:UsersruslaOneDriveРабочий столSiteshonesttradinghonest-tradingnode_modulesreact-dev-utilsFileSizeReporter.js:138:48
    at C:UsersruslaOneDriveРабочий столSiteshonesttradinghonest-tradingnode_modulesrecursive-readdirindex.js:81:22
    at C:UsersruslaOneDriveРабочий столSiteshonesttradinghonest-tradingnode_modulesrecursive-readdirindex.js:81:22
    at C:UsersruslaOneDriveРабочий столSiteshonesttradinghonest-tradingnode_modulesrecursive-readdirindex.js:88:20
    at FSReqCallback.oncomplete (node:fs:208:5) {
  errno: -4094,
  syscall: 'read',
  code: 'UNKNOWN'
}

Node.js v18.14.2

How to fix it?

I have tried to type "npm start" and got this:

rror: 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:UsersruslaOneDriveРабочий столSiteshonesttradinghonest-tradingnode_moduleswebpacklibutilcreateHash.js:90:53)
    at NormalModule._initBuildHash (C:UsersruslaOneDriveРабочий столSiteshonesttradinghonest-tradingnode_moduleswebpacklibNormalModule.js:386:16)
    at C:UsersruslaOneDriveРабочий столSiteshonesttradinghonest-tradingnode_moduleswebpacklibNormalModule.js:418:10
    at C:UsersruslaOneDriveРабочий столSiteshonesttradinghonest-tradingnode_moduleswebpacklibNormalModule.js:293:13
    at C:UsersruslaOneDriveРабочий столSiteshonesttradinghonest-tradingnode_modulesloader-runnerlibLoaderRunner.js:367:11
    at C:UsersruslaOneDriveРабочий столSiteshonesttradinghonest-tradingnode_modulesloader-runnerlibLoaderRunner.js:233:18
    at context.callback (C:UsersruslaOneDriveРабочий столSiteshonesttradinghonest-tradingnode_modulesloader-runnerlibLoaderRunner.js:111:13)
    at C:UsersruslaOneDriveРабочий столSiteshonesttradinghonest-tradingnode_modulesbabel-loaderlibindex.js:51:103 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],      
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.14.2

2

Answers


  1. The issue is either due to the corrupted files or old cache files.

    For the cache problem run the following command:

    npm cache clear --force
    

    As @heisenberg mentioned you can try removing your package lock and install again.

    Login or Signup to reply.
  2. The error may be coming because of your nodejs versions run the command

    node -v
    

    there may be a chance that your nodejs version needs to be downgraded as your project is 4 months old. For this you can use NVM to achieve multiple node versions.use the following command to use a specific node version.

    nvm use your_specific_version
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search