0
C:\Users\samy\Jobs\sahl_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:\Users\samy\Jobs\sahl_project\vite.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:\Users\samy\Jobs\sahl_project\node_modules\esbuild\lib\main.js:1649:15)
    at C:\Users\samy\Jobs\sahl_project\node_modules\esbuild\lib\main.js:1058:25
    at runOnEndCallbacks (C:\Users\samy\Jobs\sahl_project\node_modules\esbuild\lib\main.js:1484:45)
    at buildResponseToResult (C:\Users\samy\Jobs\sahl_project\node_modules\esbuild\lib\main.js:1056:7)
    at C:\Users\samy\Jobs\sahl_project\node_modules\esbuild\lib\main.js:1085:16
    at responseCallbacks.<computed> (C:\Users\samy\Jobs\sahl_project\node_modules\esbuild\lib\main.js:703:9)
    at handleIncomingPacket (C:\Users\samy\Jobs\sahl_project\node_modules\esbuild\lib\main.js:762:9)
    at Socket.readFromStdout (C:\Users\samy\Jobs\sahl_project\node_modules\esbuild\lib\main.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.

1
  • It looks like you have an unresolved git merge conflict in package.json. Commented Aug 16, 2023 at 16:23

2 Answers 2

1

It's tricky to say where exactly is the problem from your question but you could try some of these ways to solve the problem,

  1. Try to check for merge conflicts by using git diff --name-only --diff-filter=U --relative to list out the files causing the problem.
  2. Try running npm ci before you run npm run dev
  3. Try to freshly clone the project in a different location & run npm i on the master & then npm run dev to see if the problem persists.
  4. Check if you're using the right node version node -v compatible for your project.
Sign up to request clarification or add additional context in comments.

Comments

0

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 files

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.