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.93k stars 1.61k forks source link

Cannot find module 'js-cookie' imported from '/app/app/components/chat/BaseChat.tsx' #237

Closed Gaurav-Wankhede closed 1 week ago

Gaurav-Wankhede commented 1 week ago

Describe the bug

Cannot find module 'js-cookie' imported from '/app/app/components/chat/BaseChat.tsx' at nodeImport (file:///app/nodemodules/.pnpm/vite@5.3.1@types+node@20.14.9_sass@1.77.6/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:53484:19) at ssrImport (file:///app/nodemodules/.pnpm/vite@5.3.1@types+node@20.14.9_sass@1.77.6/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:53349:22) at eval (/app/app/components/chat/BaseChat.tsx:18:38) at async instantiateModule (file:///app/nodemodules/.pnpm/vite@5.3.1@types+node@20.14.9_sass@1.77.6/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:53408:5 Click outside, press Esc key, or fix the code to dismiss. You can also disable this overlay by setting server.hmr.overlay to false in vite.config.ts.

Link to the Bolt URL that caused the error

http://localhost:5173/

Steps to reproduce

.

Expected behavior

.

Screen Recording / Screenshot

No response

Platform

Additional context

No response

milutinke commented 1 week ago

Run npm install js-cookie in the terminal. Then re-run the dev server with npm run dev

wonderwhy-er commented 1 week ago

Or just npm install as its in package.json js-cookie

No bug to fix here

wonderwhy-er commented 1 week ago

Closed as resolved

tazomatalax commented 1 week ago

I get this after running docker compose up --profile development

Cannot find module 'js-cookie' imported from '/app/app/components/chat/BaseChat.tsx'
    at nodeImport (file:///app/node_modules/.pnpm/vite@5.3.1_@types+node@20.14.9_sass@1.77.6/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:53484:19)
    at ssrImport (file:///app/node_modules/.pnpm/vite@5.3.1_@types+node@20.14.9_sass@1.77.6/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:53349:22)
    at eval (/app/app/components/chat/BaseChat.tsx:18:38)
    at async instantiateModule (file:///app/node_modules/.pnpm/vite@5.3.1_@types+node@20.14.9_sass@1.77.6/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:53408:5
Click outside, press Esc key, or fix the code to dismiss.
You can also disable this overlay by setting server.hmr.overlay to false in vite.config.ts.

Tried npm install js-cookie in the container and got

npm error Cannot read properties of null (reading 'matches')
npm notice
npm notice New minor version of npm available! 10.8.2 -> 10.9.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.9.0
npm notice To update run: npm install -g npm@10.9.0
npm notice
npm error A complete log of this run can be found in: /root/.npm/_logs/2024-11-12T07_57_04_273Z-debug-0.log
tazomatalax commented 1 week ago

fixed by running

pnpm install 

in container

wmehanna commented 1 week ago

fixed by running

pnpm install 

in container

can you elaborate ?