Deployment blocked by internal framework error

I'm getting a persistent error that's preventing my Discord bot app from deploying: Error: Cannot find module '@gadgetinc/api-client-core' Location: /gadget/app/.gadget/client/dist-cjs/index.js This appears to be an internal Gadget framework issue with the auto-generated client package. The error occurs during app boot and the system logs "could not create API client, trying to proceed anyways..." App: https://my-di5cord-b0t--development.gadget.app/ Environment: Development This is blocking my deployment to production Error: Cannot find module '@gadgetinc/api-client-core' File: /gadget/app/.gadget/client/dist-cjs/index.js (auto-generated) App: my-di5cord-b0t Issue: Can't deploy Discord bot to production This is an internal Gadget framework issue with the auto-generated client package. The error happens during app boot. Need help ASAP! šŸ™
9 Replies
K1ng
K1ngOP•4w ago
I got told to post this in here
K1ng
K1ngOP•4w ago
No description
K1ng
K1ngOP•4w ago
It told me to change it to Urgent by the way
Chocci_Milk
Chocci_Milk•4w ago
Hello, I'm looking at your app and there are a few things that I find concerning. You seem to have removed everything that is Gadget in the package.json. This also includes modifying the build script that's given by default. You will probably need to restore the original version of that file. Side note: You should be running the Discord bot from a boot plugin. Here are some docs: https://docs.gadget.dev/guides/http-routes/route-structure#boot-plugins
K1ng
K1ngOP•4w ago
Thank you I shall see if this sorts it Do you have the original version? { "name": "my-discord-bot", "version": "1.0.0", "description": "Discord anti-ping bot for Gadget", "main": "index.js", "license": "UNLICENSED", "private": true, "scripts": { "build": "NODE_ENV=production vite build", "start": "node index.js", "dev": "vite" }, "dependencies": { "@gadgetinc/react": "^0.17.2", "@gadget-client/my-discord-bot": "link:.gadget/client", "discord.js": "^14.0.0", "fastify": "^4.24.2", "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.15.0" }, "devDependencies": { "@types/node": "^20.12.8", "@types/react": "^18.0.28", "@types/react-dom": "^18.0.11", "@vitejs/plugin-react-swc": "^3.2.0", "typescript": "^4.5.5", "vite": "^5.3.5" } } Is this the original version
Chocci_Milk
Chocci_Milk•4w ago
We don't have readily available versions of your code to cross-reference with. This does, however, look like a package.json that would make sense. Note that if you want to be more diligent during your development process, you should use ggt and git to source control
K1ng
K1ngOP•4w ago
Thank you, i think i have sorted it now there are no errors The bots commands won't work
Chocci_Milk
Chocci_Milk•4w ago
Hello, Could you please make new posts for different issues? We request that people do this so that its easier for other users to read when they have issues of their own
Gizmo
Gizmo•4d ago
Do you like this answer? ​

Did you find this page helpful?