You are using an unsupported version of node. Please update to at least node v12.14
1. In Laravel 8.6.3, Laravel Breeze is installed, and when executing npm run dev, an error is reported: You are using an unsupported version of node. Please update to at least node v12.14. as shown in Figure 1
PS E:\wwwroot\laravel-8-5> php artisan breeze:install
Breeze scaffolding installed successfully.
Please execute the "npm install && npm run dev" command to build your assets.
PS E:\wwwroot\laravel-8-5> npm install
npm WARN notice [SECURITY] lodash has the following vulnerability: 1 high. Go here for more details: https://www.npmjs.com/advisories?search=lodash&version=4.17.21 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN postcss-load-config@3.1.0 requires a peer of ts-node@>=9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-notifier@1.14.1 requires a peer of @types/webpack@^4.41.31 but none is installed. You must install peer dependencies yourself.
npm WARN ws@8.2.3 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@8.2.3 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
added 812 packages in 126.222s
PS E:\wwwroot\laravel-8-5> npm run dev
> @ dev E:\wwwroot\laravel-8-5
> npm run development
> @ development E:\wwwroot\laravel-8-5
> mix
Error: You are using an unsupported version of Node. Please update to at least Node v12.14
at assertSupportedNodeVersion (E:\wwwroot\laravel-8-5\node_modules\laravel-mix\src\Engine.js:6:15)
at executeScript (E:\wwwroot\laravel-8-5\node_modules\laravel-mix\bin\cli.js:61:5)
at Command.program.command.description.option.action (E:\wwwroot\laravel-8-5\node_modules\laravel-mix\bin\cli.js:47:13)
at Command.listener [as _actionHandler] (E:\wwwroot\laravel-8-5\node_modules\commander\index.js:922:31)
at Command._parseCommand (E:\wwwroot\laravel-8-5\node_modules\commander\index.js:1503:14)
at Command._dispatchSubcommand (E:\wwwroot\laravel-8-5\node_modules\commander\index.js:1443:18)
at Command._parseCommand (E:\wwwroot\laravel-8-5\node_modules\commander\index.js:1469:12)
at Command.parse (E:\wwwroot\laravel-8-5\node_modules\commander\index.js:1292:10)
at Command.parseAsync (E:\wwwroot\laravel-8-5\node_modules\commander\index.js:1318:10)
at run (E:\wwwroot\laravel-8-5\node_modules\laravel-mix\bin\cli.js:50:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ development: `mix`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2021-10-21T02_45_05_986Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2021-10-21T02_45_06_047Z-debug.log
PS E:\wwwroot\laravel-8-5>
2. Check the version of Node.js: v8.10.0. The required version is at least: Node v12.14. as shown in Figure 2
PS E:\wwwroot\laravel-8-5> node -v
v8.10.0
3. Reference URL:https://www.jianshu.com/p/0f3fdf6c0d5f, reinstall the latest stable version. Download 14.18.1 LTS. The installation path is the same as the old version: c:/program files/nodejs. as shown in Figure 3
4. Check the version of Node.js again: v14.18.1. as shown in Figure 4
PS E:\wwwroot\laravel-8-5> node -v
v8.10.0
PS E:\wwwroot\laravel-8-5> npm -v
5.5.1
PS E:\wwwroot\laravel-8-5> where node
PS E:\wwwroot\laravel-8-5> node -v
v14.18.1
PS E:\wwwroot\laravel-8-5> npm -v
5.5.1
5. npm warn npm npm does not support node.js v14.18.1. Reference URL:https://stackoverflow.com/questions/63196042/npm-does-not-support-node-js-v12-18-3. Enter the directory: C:\Users\Administrator\AppData\Roaming\. Delete npm and npm-cache folders. as shown in Figure 5
6. Check the version of npm: 6.14.15, update npm again. Execute the command: npm install -g npm. Upgrade to version: 8.1.0. as shown in Figure 6
PS E:\wwwroot\laravel-8-5> npm -v
6.14.15
PS E:\wwwroot\laravel-8-5> npm install -g npm
C:\Users\Administrator\AppData\Roaming\npm\npm -> C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
C:\Users\Administrator\AppData\Roaming\npm\npx -> C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\bin\npx-cli.js
+ npm@8.1.0
added 220 packages from 96 contributors in 25.764s
PS E:\wwwroot\laravel-8-5> npm -v
8.1.0
PS E:\wwwroot\laravel-8-5>
7. Repeat the first step, the installation is successful, and no errors will be reported. in line with expectations. as shown in Figure 7
PS E:\wwwroot\laravel-8-5> npm -v
8.1.0
PS E:\wwwroot\laravel-8-5> php artisan breeze:install
Breeze scaffolding installed successfully.
Please execute the "npm install && npm run dev" command to build your assets.
PS E:\wwwroot\laravel-8-5> composer require laravel/breeze --dev
Using version ^1.4 for laravel/breeze
./composer.json has been updated
Running composer update laravel/breeze
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package sebastian/resource-operations is abandoned, you should avoid using it. No replacement was suggested.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: facade/ignition
Discovered Package: fruitcake/laravel-cors
Discovered Package: laravel/breeze
Discovered Package: laravel/sail
Discovered Package: laravel/sanctum
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Package manifest generated successfully.
78 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> @php artisan vendor:publish --tag=laravel-assets --ansi
No publishable resources for tag [laravel-assets].
Publishing complete.
PS E:\wwwroot\laravel-8-5> npm run devnpm install
^C终止批处理操作吗(Y/N)? Y
PS E:\wwwroot\laravel-8-5> npm install
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
changed 48 packages, and audited 813 packages in 1m
88 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
PS E:\wwwroot\laravel-8-5> npm run dev
> dev
> npm run development
> development
> mix
* Mix █████████████████████████ emitting (95%)
emit
* Mix █████████████████████████ done (99%) plugins
WebpackBar:done
√ Mix
Compiled successfully in 10.53s
Laravel Mix v6.0.34
✔ Compiled Successfully in 10214ms
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────┬──────────┐
│ File │ Size │
├───────────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────┤
│ /js/app.js │ 682 KiB │
│ css/app.css │ 3.83 MiB │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────┘
* Mix █████████████████████████ cache (99%)
begin idle
webpack compiled successfully
PS E:\wwwroot\laravel-8-5> php artisan migrate
Nothing to migrate.
PS E:\wwwroot\laravel-8-5>






