Mar 5, 2024
0
Level 4
npm run dev command not working on Laravel 10 and Vue Js project
using Laravel 10 and install vite with the project and I am using Node 16 version in my pc. this is package.json
{
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.4",
"axios": "^1.6.4",
"laravel-vite-plugin": "^1.0.0",
"vite": "^5.0.0",
"vue": "^3.4.21"
}
}
and vite.config.js
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue'
export default defineConfig({
plugins: [
laravel({
input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: true,
}),
vue({
template: {
base: null,
includeAbsolute: false
}
})
],
});
but when I try to run npm run dev command it is generating following error message
'Inertia\larazillow\node_modules\.bin\' is not recognized as an internal or exte
rnal command,
operable program or batch file.
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'D:\laravel-mix\bin\cli.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15
)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_ma
in:77:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
how to fix this problem?
Please or to participate in this conversation.