0

I am following the instructions at https://jetstream.laravel.com/installation.html for installing Laravel Jetstream.

I run artisan jetstream:install and choose to install with Livewire support, API support, email verification and PHPUnit support.

I then run npm install per the instructions, and everything seems to work.

Finally, I run npm run build per the instructions. Uh oh! I now get the following message:

> build
> vite build

file:///home/mrmayor/Documents/coding-projects/super-great-project/backend/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)

Any idea what I'm doing wrong?

1 Answers1

0

This happens on Vite due to NodeJS Version Incompatibility. Try upgrading your NodeJS to v16 or Latest.

For More Details: npm run dev not working with vite laravel 9

BadPiggie
  • 5,471
  • 1
  • 14
  • 28