Nevermind, I updated node via nvm to version 16.16.0 and now all works well.
Aug 11, 2022
4
Level 1
Npm run build fails with vite - laravel 9
Hi, I installed a fresh new project with Laravel 9 that by default installs Vite, as you know. But I can't actually run npm run build, because it fails with this error code:
file:///var/www/html/{...}/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)
That refers to a vite file. How can I resolve?
I'm running Laravel on Ubuntu 22 (LAMP stack), PHP 8. Thanks.
Level 1
4 likes
Please or to participate in this conversation.