Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

priyalaks's avatar

vite: not found in Production

I used Xamp on my local - Everything worked fine . When I pushed to Production I am facing Vite found issue .

Steps I Followed.

  1. Pulled things to PROD.
  2. The
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
  1. Then ran the below
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)
0 likes
4 replies
Sinnbeck's avatar

Sounds like you might be running an old version of node. What is the output of node -v

mubeensaeed's avatar

@priyalaks

await import('source-map-support').then((r) => r.default.install())

This is only available as dev dependency

Please or to participate in this conversation.