stackblitz / bolt.new

Prompt, run, edit, and deploy full-stack web applications
https://bolt.new
MIT License
4.17k stars 486 forks source link

Running locally - 'bindings' is not recognized #133

Open badboyilprimo opened 3 days ago

badboyilprimo commented 3 days ago

Describe the bug

running locally using pnpm run preview causes the following error

`> bolt@ start dir\bolt.new

bindings=$(./bindings.sh) && wrangler pages dev ./build/client $bindings

'bindings' is not recognized as an internal or external command, operable program or batch file.`

running using pnpm run dev runs the server and page can open but can't do anything beyond that, API key is in the .env

prompt box doesn't have a button to submit and enter doesn't do anything. click on the examples bellow does nothing as well

Link to the Bolt URL that caused the error

local

Steps to reproduce

pnpm run preview

or start and build > start

Expected behavior

build completes app start

Screen Recording / Screenshot

No response

Platform

Additional context

No response

kirjavascript commented 3 days ago

Hi! 👋 Thanks a lot for the report! 😃

We're tracking this issue internally and will let you know when we have a fix in place.

badboyilprimo commented 3 days ago

after a chat with gpt, this has worked but only to bypass this error but the app still not working in contacting the API seems to be a windows vs linux issue

"start": "powershell -Command \"$bindings = $(./bindings.sh); wrangler pages dev ./build/client $bindings\"",

FrancisVarga commented 2 days ago

sh has linux commands wont work on windows even if you have pnpm installed. use WSL

badboyilprimo commented 2 days ago

sh has linux commands wont work on windows even if you have pnpm installed. use WSL

Thank you @FrancisVarga , this made me fix the issue since the sh is trying to read API key from .env, by changing the start script to the following it works.

"start": "wrangler pages dev ./build/client --binding ANTHROPIC_API_KEY=XXX