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

Caracorn's avatar

Breeze installation: npm ERR!

Hello, I wanted to install Breeze. Everything went well and now at the end "npm run development" is on strike. It appears: SyntaxError: Unexpected token function at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) ... npm ERR! Windows_NT 10.0.18363 ....

Mine composer.json looks like this: "require": { "php": "^7.3|^8.0", "fruitcake/laravel-cors": "^2.0", "guzzlehttp/guzzle": "^7.0.1", "laravel/framework": "^8.65", "laravel/sanctum": "^2.11", "laravel/tinker": "^2.5" }, "require-dev": { "facade/ignition": "^2.5", "fakerphp/faker": "^1.9.1", "laravel/breeze": "^1.4", "laravel/sail": "^1.0.1", "mockery/mockery": "^1.4.4", "nunomaduro/collision": "^5.10", "phpunit/phpunit": "^9.5.10" },

I am using Laragon. Is there any ideas?

0 likes
3 replies
aschmelyun's avatar
Level 4

Are you running your npm run development command through the Laragon server, or from your command line in a local Node installation?

This error likely appears because the Node version being used is out of date. I'd recommend searching for guides on how to upgrade Node + npm for your particular operating system.

1 like
Caracorn's avatar

Thank you very much for the hint. I already had the latest version of NODEJS installed on Windows. But Laragon has its own area for this: laragon\bin\nodejs\

I have now downloaded the binary version of NODEJS and placed the unzipped folder in the Laragon area laragon\bin\nodejs\ and it works fine now.

Caracorn's avatar

I see, also deleted the temp files of rpn in the folder before running npm: C:\Users\Caracorn\AppData\Roaming\

Please or to participate in this conversation.