1

so im in a project of my company who i work for but im having a problem of doing npm run dev, doesnt work. i already tried npm install nuxt, npm install node so i dont know what to do :(

enter image description here

  node:internal/crypto/hash:71
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

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\victo\juntos-pelo-miguel\front-end\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (C:\Users\victo\juntos-pelo-miguel\front-end\node_modules\webpack\lib\NormalModule.js:417:16)
    at handleParseError (C:\Users\victo\juntos-pelo-miguel\front-end\node_modules\webpack\lib\NormalModule.js:471:10)
    at C:\Users\victo\juntos-pelo-miguel\front-end\node_modules\webpack\lib\NormalModule.js:503:5
    at C:\Users\victo\juntos-pelo-miguel\front-end\node_modules\webpack\lib\NormalModule.js:358:12
    at C:\Users\victo\juntos-pelo-miguel\front-end\node_modules\webpack\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\Users\victo\juntos-pelo-miguel\front-end\node_modules\webpack\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at Array.<anonymous> (C:\Users\victo\juntos-pelo-miguel\front-end\node_modules\webpack\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
    at Storage.finished (C:\Users\victo\juntos-pelo-miguel\front-end\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
    at C:\Users\victo\juntos-pelo-miguel\front-end\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
    at C:\Users\victo\juntos-pelo-miguel\front-end\node_modules\graceful-fs\graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
vitoria
  • 37
  • 6
  • Even tho I'm here to help, don't feel too shy to ask the company itself. You will grow there and will have a better relationship with your colleagues by solving issues for each other. I know it can be stressful to not feel able to start "something simple" like a dev environment, but everybody needs a bit of push when beginning. Asking questions is never a bad thing, quite the opposite actually. :) – kissu Nov 29 '22 at 02:19

1 Answers1

2

From what I can see, you have a Nuxt2 app while using Node v18 given your screenshots.
Nuxt2 works better with Node v16.
I recommend that you use nvm (if not already the case) to install that version rather.

Don't forget to also delete your node_modules in between changing from Node 18 to 16.
Keep your package-lock.json (or yarn.lock) file intact tho, no need to delete it.

kissu
  • 40,416
  • 14
  • 65
  • 133