Home  >  Q&A  >  body text

When executing `npm run dev` I encountered the following error

<p>C:UserssamyJobssahl_project>npm run dev</p> <blockquote> <p>sahl_project@1.0.0 dev vite</p> </blockquote> <p>X [ERROR] Expected string in JSON but found "<<"</p> <pre class="brush:php;toolbar:false;">../package.json:2:0: 2 │ <<<<<<< HEAD ╵ ~~</pre> <p>Unable to load configuration file from C:UserssamyJobssahl_projectvite.config.js Error starting development server: Error: Build failed with 1 error: ../package.json:2:0: Error: Expected string in JSON but found "<<"</p> <p>I tried deleting package-lock.json and node_modules folders and executing npm install, but it didn’t work</p>
P粉819533564P粉819533564453 days ago528

reply all(1)I'll reply

  • P粉446800329

    P粉4468003292023-08-16 13:43:39

    It can be difficult to determine the specific source of the problem, but there are a few things you can try to resolve it:

    1. Try using git diff --name-only --diff-filter=U --relative to check for merge conflicts and list the files causing the problem.
    2. Before running npm run dev, try running npm ci.
    3. Try to newly clone the project in a different location and run npm i on the master branch, then run npm run dev to see if the problem persists.
    4. Check that you are using the correct Node version that is compatible with your project node -v.

    reply
    0
  • Cancelreply