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
Someone posted an issue on the sveltekit repo with details and a repro, I found that it was caused by only updating vite from 3 to 4 which is a dependency for sveltekit 1.0...
I'm reposting the sveltekit OP's details to satisfy the bug report...
import * as uuid from 'uuid' import { v4 as uuidv4 } from "uuid"; export const GET = async () => { // console.log('uuid', uuid.v4()) console.log('uuidv4', uuidv4()) }
Cannot read properties of undefined (reading 'v4') TypeError: Cannot read properties of undefined (reading 'v4') at GET (/Users/thangvu/repos/github/sveltekit-repro-uuid/src/routes/api/test/+server.js:5:24) at render_endpoint (file:///Users/thangvu/repos/github/sveltekit-repro-uuid/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@sveltejs/kit/src/runtime/server/endpoint.js:45:26) at resolve (file:///Users/thangvu/repos/github/sveltekit-repro-uuid/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@sveltejs/kit/src/runtime/server/index.js:398:23) at async respond (file:///Users/thangvu/repos/github/sveltekit-repro-uuid/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@sveltejs/kit/src/runtime/server/index.js:261:20) at async file:///Users/thangvu/repos/github/sveltekit-repro-uuid/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:480:22
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.
Describe the bug
Someone posted an issue on the sveltekit repo with details and a repro, I found that it was caused by only updating vite from 3 to 4 which is a dependency for sveltekit 1.0...
I'm reposting the sveltekit OP's details to satisfy the bug report...
import * as uuid from 'uuid' import { v4 as uuidv4 } from "uuid"; export const GET = async () => { // console.log('uuid', uuid.v4()) console.log('uuidv4', uuidv4()) }
Cannot read properties of undefined (reading 'v4') TypeError: Cannot read properties of undefined (reading 'v4') at GET (/Users/thangvu/repos/github/sveltekit-repro-uuid/src/routes/api/test/+server.js:5:24) at render_endpoint (file:///Users/thangvu/repos/github/sveltekit-repro-uuid/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@sveltejs/kit/src/runtime/server/endpoint.js:45:26) at resolve (file:///Users/thangvu/repos/github/sveltekit-repro-uuid/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@sveltejs/kit/src/runtime/server/index.js:398:23) at async respond (file:///Users/thangvu/repos/github/sveltekit-repro-uuid/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@sveltejs/kit/src/runtime/server/index.js:261:20) at async file:///Users/thangvu/repos/github/sveltekit-repro-uuid/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:480:22
Relevant sveltekit issue
Reproduction
https://github.com/ThangHuuVu/sveltekit-uuid-reproduction
Steps to reproduce
No response
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: