coleam00 / bolt.new-any-llm

Prompt, run, edit, and deploy full-stack web applications using any LLM you want!
https://bolt.new
MIT License
3.2k stars 1.36k forks source link

npm install fails with docker #283

Closed tlohm closed 3 days ago

tlohm commented 3 days ago

Describe the bug

I'm not a Techie. I followed the instructions in the README file. However, I keep running into problems

I use the Google Gemini 1.5 Flash model. It works fine, i.e., creates files and writes code, however it fails to run npm install. grafik

Bolt Terminal output: ❯ npm install npm ERR! code EJSONPARSE npm ERR! path /home/project/package.json npm ERR! JSON.parse JSON.parse: unterminated string literal at line 8 column 10 of the JSON data while parsing ' npm ERR! JSON.parse { npm ERR! JSON.parse "name": "todo-app", npm ERR! JSON.parse "' npm ERR! JSON.parse Failed to parse JSON data. npm ERR! JSON.parse Note: package.json must be actual JSON, not just JavaScript.

npm ERR! A complete log of this run can be found in: /home/.npm/_logs/2024-11-14T14_32_21_992Z-debug-0.log

If i run npm install in the terminal myself, the error message is: ❯ npm install npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: todo-app@0.0.0 npm ERR! Found: vite@4.5.5 npm ERR! node_modules/vite npm ERR! dev vite@"^4.1.4" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer vite@"^3.0.0" from @vitejs/plugin-react@2.2.0 npm ERR! node_modules/@vitejs/plugin-react npm ERR! dev @vitejs/plugin-react@"^2.1.0" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! npm ERR! For a full report see: npm ERR! /home/.npm/_logs/2024-11-14T14_35_43_093Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /home/.npm/_logs/2024-11-14T14_35_43_093Z-debug-0.log

Link to the Bolt URL that caused the error

bolt.new

Steps to reproduce

  1. Install Docker and perform the setup as described in the README
  2. open docker with docker build . --target bolt-ai-development and docker-compose --profile development up
  3. Use Bolt to code anything, e.g. the pre-built todo-app prompt

Expected behavior

npm install should work.

Screen Recording / Screenshot

No response

Platform

Additional context

No response

coleam00 commented 3 days ago

@tlohm It looks like the LLM just hallucinated an incorrect package.json file... the error is saying the package.json isn't valid JSON. I would give it another shot or try a different model!