vite `npm run dev` error: Missing script: "dev"

% npm run dev
npm ERR! Missing script: "dev"
% npm run dev
npm ERR! Missing script: "dev"
in package.json
"scripts": {
"dev": "vite",
"build": "vite build",
"lint": "eslint src --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"scripts": {
"dev": "vite",
"build": "vite build",
"lint": "eslint src --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
4 Replies
ghostmonkey
ghostmonkey2y ago
probably not in the correct directory/
redtypoOooOo
redtypoOooOoOP2y ago
@username Ecommerce Website % npm run dev
@username Ecommerce Website % npm run dev
this is the project file; which directory should it be in?
ghostmonkey
ghostmonkey2y ago
no i'm saying, you probably tried to run the command outside of the project directory
redtypoOooOo
redtypoOooOoOP2y ago
u r right it works now. should be in the sub file @ghostmonkey thanks!
Want results from more Discord servers?
Add your server