C:UserssamyJobssahl_project>npm run dev
[email protected] dev
vite
X [ERROR] Expected string in JSON but found "<<"
../package.json:2:0:
2 │ <<<<<<< HEAD
╵ ~~
failed to load config from C:UserssamyJobssahl_projectvite.config.js
error when starting dev server:
Error: Build failed with 1 error:
../package.json:2:0: ERROR: Expected string in JSON but found "<<"
at failureErrorWithLog (C:UserssamyJobssahl_projectnode_modulesesbuildlibmain.js:1649:15)
at C:UserssamyJobssahl_projectnode_modulesesbuildlibmain.js:1058:25
at runOnEndCallbacks (C:UserssamyJobssahl_projectnode_modulesesbuildlibmain.js:1484:45)
at buildResponseToResult (C:UserssamyJobssahl_projectnode_modulesesbuildlibmain.js:1056:7)
at C:UserssamyJobssahl_projectnode_modulesesbuildlibmain.js:1085:16
at responseCallbacks.<computed> (C:UserssamyJobssahl_projectnode_modulesesbuildlibmain.js:703:9)
at handleIncomingPacket (C:UserssamyJobssahl_projectnode_modulesesbuildlibmain.js:762:9)
at Socket.readFromStdout (C:UserssamyJobssahl_projectnode_modulesesbuildlibmain.js:679:7)
at Socket.emit (node:events:513:28)
at addChunk (node
:internal/streams/readable:324:12)
I tried to delete package-lock.json
and the node_modules
folder and do npm install
, but that does not work.
2
Answers
You have git conflicts in your
package.json
file. You should resolve them (and any other git conflicts) before trying to do anything else.Note
You can run
git diff --check
to help find offending git filesIt’s tricky to say where exactly is the problem from your question but you could try some of these ways to solve the problem,
git diff --name-only --diff-filter=U --relative
to list out the files causing the problem.npm ci
before you runnpm run dev
npm i
on the master & thennpm run dev
to see if the problem persists.node -v
compatible for your project.