Invalid define value
romainmartinez opened this issue · comments
Romain Martinez commented
Versions
nuxt-vite: 0.0.36
nuxt: 2.15.3
Reproduction
yarn create nuxt-app test
With the following options
- Programming language:
JavaScript
- Package manager:
Yarn
- UI framework:
Tailwind CSS
- Nuxt.js modules:
Content
- Linting tools:
ESLint
,Prettier
andLint staged files
- Testing framework:
None
- Rendering mode:
Universal (SSR / SSG)
- Deployment target:
Static (Static/Jamstack hosting)
- Development tools:
jsconfig.json
- Continuous integration:
GitHub Actions (GitHub only)
Description
I get the following error when using yarn dev
ERROR Build failed with 2 errors: 10:46:32
error: Invalid define value (must be valid JSON syntax or a single identifier): import.meta.env
error: Invalid define value (must be valid JSON syntax or a single identifier): globalThis.__webpack_public_path__
error: Invalid define value (must be valid JSON syntax or a single identifier): import.meta.env
error: Invalid define value (must be valid JSON syntax or a single identifier): globalThis.__webpack_public_path__
at failureErrorWithLog (node_modules/esbuild/lib/main.js:1224:15)
at buildResponseToResult (node_modules/esbuild/lib/main.js:936:32)
at node_modules/esbuild/lib/main.js:1035:20
at node_modules/esbuild/lib/main.js:568:9
at handleIncomingPacket (node_modules/esbuild/lib/main.js:657:9)
at Socket.readFromStdout (node_modules/esbuild/lib/main.js:535:7)
at Socket.emit (node:events:376:20)
at addChunk (node:internal/streams/readable:304:12)
at readableAddChunk (node:internal/streams/readable:279:9)
at Socket.Readable.push (node:internal/streams/readable:218:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:192:23)