N
Nuxt3mo ago
elvinas

Cannot start nuxt: crypto.hash is not a function

Hey all, I'm trying to create a new Nuxt 4 project. However, no matter what I do - I get the following error:
ERROR Cannot start nuxt: crypto.hash is not a function 9:27:41 PM

at getHash (node_modules/vite/dist/node/chunks/dep-Bg4HVnP5.js:2788:21)
at getLockfileHash (node_modules/vite/dist/node/chunks/dep-Bg4HVnP5.js:11673:9)
at getDepHash (node_modules/vite/dist/node/chunks/dep-Bg4HVnP5.js:11676:23)
at initDepsOptimizerMetadata (node_modules/vite/dist/node/chunks/dep-Bg4HVnP5.js:11137:53)
at createDepsOptimizer (node_modules/vite/dist/node/chunks/dep-Bg4HVnP5.js:34621:17)
at new DevEnvironment (node_modules/vite/dist/node/chunks/dep-Bg4HVnP5.js:35385:109)
at Object.defaultCreateClientDevEnvironment [as createEnvironment] (node_modules/vite/dist/node/chunks/dep-Bg4HVnP5.js:35804:9)
at _createServer (node_modules/vite/dist/node/chunks/dep-Bg4HVnP5.js:28376:132)
at async buildClient (node_modules/@nuxt/vite-builder/dist/index.mjs:921:24)
at async withLogs (node_modules/@nuxt/vite-builder/dist/index.mjs:1768:3)
ERROR Cannot start nuxt: crypto.hash is not a function 9:27:41 PM

at getHash (node_modules/vite/dist/node/chunks/dep-Bg4HVnP5.js:2788:21)
at getLockfileHash (node_modules/vite/dist/node/chunks/dep-Bg4HVnP5.js:11673:9)
at getDepHash (node_modules/vite/dist/node/chunks/dep-Bg4HVnP5.js:11676:23)
at initDepsOptimizerMetadata (node_modules/vite/dist/node/chunks/dep-Bg4HVnP5.js:11137:53)
at createDepsOptimizer (node_modules/vite/dist/node/chunks/dep-Bg4HVnP5.js:34621:17)
at new DevEnvironment (node_modules/vite/dist/node/chunks/dep-Bg4HVnP5.js:35385:109)
at Object.defaultCreateClientDevEnvironment [as createEnvironment] (node_modules/vite/dist/node/chunks/dep-Bg4HVnP5.js:35804:9)
at _createServer (node_modules/vite/dist/node/chunks/dep-Bg4HVnP5.js:28376:132)
at async buildClient (node_modules/@nuxt/vite-builder/dist/index.mjs:921:24)
at async withLogs (node_modules/@nuxt/vite-builder/dist/index.mjs:1768:3)
Thys is my machine info:
------------------------------
- Operating System: Darwin
- Node Version: v21.6.0
- Nuxt Version: 4.0.1
- CLI Version: 3.26.4
- Nitro Version: 2.12.3
- Package Manager: bun@1.2.15
- Builder: -
- User Config: compatibilityDate, devtools, modules
- Runtime Modules: @nuxt/ui@3.2.0
- Build Modules: -
------------------------------
------------------------------
- Operating System: Darwin
- Node Version: v21.6.0
- Nuxt Version: 4.0.1
- CLI Version: 3.26.4
- Nitro Version: 2.12.3
- Package Manager: bun@1.2.15
- Builder: -
- User Config: compatibilityDate, devtools, modules
- Runtime Modules: @nuxt/ui@3.2.0
- Build Modules: -
------------------------------
Is there a way to go around this?
2 Replies
kapa.ai
kapa.ai3mo ago
Hi @elvinas. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- I'm sorry, but the knowledge sources provided do not contain any information about the error Cannot start nuxt: crypto.hash is not a function or its resolution in the context of Nuxt 4. There are no references to this specific error or related workarounds in the available documentation or issues. If you need further assistance, you may want to check the official Nuxt GitHub issues or discussions for more up-to-date troubleshooting. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai3mo ago
<@403132334930526220> Kapa.ai is still learning and improving, please let me know how I did by reacting below.

Did you find this page helpful?