~/…/REACT/my-react $ npm run dev
[email protected] dev
vite
✘ [ERROR] Expected “,” in JSON but found “”devDependencies””
../../../package.json:9:2:
9 │ "devDependencies": {},
│ ~~~~~~~~~~~~~~~~~
╵ ,
failed to load config from /data/data/com.termux/files/home/storage/REACT/my-react/vite.config.js
error when starting dev server:
Error: Build failed with 1 error:
../../../package.json:9:2: ERROR: Expected “,” in JSON but found “”devDependencies””
at failureErrorWithLog (/data/data/com.termux/files/home/storage/REACT/my-react/node_modules/esbuild/lib/main.js:1472:15)
at /data/data/com.termux/files/home/storage/REACT/my-react/node_modules/esbuild/lib/main.js:945:25
at runOnEndCallbacks (/data/data/com.termux/files/home/storage/REACT/my-react/node_modules/esbuild/lib/main.js:1315:45)
at buildResponseToResult (/data/data/com.termux/files/home/storage/REACT/my-react/node_modules/esbuild/lib/main.js:943:7)
at /data/data/com.termux/files/home/storage/REACT/my-react/node_modules/esbuild/lib/main.js:970:16
at responseCallbacks. (/data/data/com.termux/files/home/storage/REACT/my-react/node_modules/esbuild/lib/main.js:622:9)
at handleIncomingPacket (/data/data/com.termux/files/home/storage/REACT/my-react/node_modules/esbuild/lib/main.js:677:12)
at Socket.readFromStdout (/data/data/com.termux/files/home/storage/REACT/my-react/node_modules/esbuild/lib/main.js:600:7)
at Socket.emit (node:events:519:28)
at addChunk (node:internal/streams/readable:559:12)
I have deleted module and package.json and install npm, yet didn’t work. I have tried a couple of other things as well. Please help me sort this out.
Okey is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.