You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using 5.4.14 and started getting this today . I have not compiled in 2 days .. there was some change 2 days ago that I saw someone do a fix for
This is on bitbucket.. .
pulling my hair out.. the little I have left..
error during build:
I am asking here since I saw someone had the same issue 2 days ago and made fix to the latest 6 branch. did it breaking something in 5?
TypeError: crypto$2.getRandomValues is not a function
at resolveConfig (file:///opt/atlassian/pipelines/agent/build/node_modules/vite/dist/node/chunks/dep-CHZK6zbr.js:66562:16)
at async build (file:///opt/atlassian/pipelines/agent/build/node_modules/vite/dist/node/chunks/dep-CHZK6zbr.js:65395:18)
at async CAC.<anonymous> (file:///opt/atlassian/pipelines/agent/build/node_modules/vite/dist/node/cli.js:829:5)
Failed to build.
Reproduction
This is a build time.. no way to reproduce for you to see. I did paste the error
Steps to reproduce
I ran a build on bitbucket .... after not coding for 2 days.. and suddenly it's throwing this error. Works fine local so not sure
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
That error would happen when crypto.getRandomValues is not supported. crypto.getRandomValues was added in Node 17.4, so if you are using a Node version that is lower than that, that error will happen.
But since Vite 5+ only supports Node 18, Node 20+, it shouldn't be a problem.
Maybe you had Vite 5 working on Node 17 which happened to work?
I need a public bitbucket repo that reproduces this to investigate further.
Hello @rchancey. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs reproduction will be closed if they have no activity within 3 days.
Thanks for the comments. we are supposed to be on node 18. I will check with the build expert to verify. We have not changed that stuff in 10 months so I am just pasting this because 2 days ago the build was fine and I get back and vite is throwing this error.. and I saw some fix for something. I will get back on the node version and update if we are not at least on 18.. which is what we should be on. FROM --platform=linux/amd64 public.ecr.aws/sam/build-nodejs18.x:latest as builder. stay tuned! We are shut down until this is fixed :-(
Describe the bug
I am using 5.4.14 and started getting this today . I have not compiled in 2 days .. there was some change 2 days ago that I saw someone do a fix for
This is on bitbucket.. .
pulling my hair out.. the little I have left..
error during build:
I am asking here since I saw someone had the same issue 2 days ago and made fix to the latest 6 branch. did it breaking something in 5?
TypeError: crypto$2.getRandomValues is not a function
Failed to build.
Reproduction
This is a build time.. no way to reproduce for you to see. I did paste the error
Steps to reproduce
I ran a build on bitbucket .... after not coding for 2 days.. and suddenly it's throwing this error. Works fine local so not sure
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: