Level 102
Sounds like you might be running an old version of node. What is the output of node -v
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I used Xamp on my local - Everything worked fine . When I pushed to Production I am facing Vite found issue .
Steps I Followed.
npm install
Got Below warnings:
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '>=14' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '^14.18.0 || >=16.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
added 43 packages, and audited 44 packages in 4s
found 0 vulnerabilities
npm run build
Got the below :
> build
> vite build
file:///var/www/uat/uat.warebe.com/node_modules/vite/bin/vite.js:7
await import('source-map-support').then((r) => r.default.install())
^^^^^
SyntaxError: Unexpected reserved word
at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18)
at async link (internal/modules/esm/module_job.js:42:21)
@priyalaks That is too old. You need 14.18+ (I recommend 16)
https://vitejs.dev/guide/#scaffolding-your-first-vite-project
Vite requires Node.js version 14.18+, 16+
Please or to participate in this conversation.