N
Nuxt3w ago
narr07

Cannot start nuxt: Could not locate the bindings file. (Nuxt Content)

config
content: {
database: {
type: 'd1',
binding: 'permadi'
}
},
hub: {
database: true,
},
content: {
database: {
type: 'd1',
binding: 'permadi'
}
},
hub: {
database: true,
},
on log error
ERROR Cannot restart nuxt: Could not locate the bindings file. Tried: nuxi 11:53:35 AM
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/build/better_sqlite3.node
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/build/Debug/better_sqlite3.node
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/build/Release/better_sqlite3.node
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/out/Debug/better_sqlite3.node
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/Debug/better_sqlite3.node
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/out/Release/better_sqlite3.node
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/Release/better_sqlite3.node
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/build/default/better_sqlite3.node
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/compiled/20.18.2/darwin/x64/better_sqlite3.node
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/addon-build/release/install-root/better_sqlite3.node
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/addon-build/debug/install-root/better_sqlite3.node
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/addon-build/default/install-root/better_sqlite3.node



ERROR Cannot restart nuxt: Could not locate the bindings file. Tried: nuxi 11:53:35 AM
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/build/better_sqlite3.node
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/build/Debug/better_sqlite3.node
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/build/Release/better_sqlite3.node
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/out/Debug/better_sqlite3.node
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/Debug/better_sqlite3.node
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/out/Release/better_sqlite3.node
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/Release/better_sqlite3.node
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/build/default/better_sqlite3.node
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/compiled/20.18.2/darwin/x64/better_sqlite3.node
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/addon-build/release/install-root/better_sqlite3.node
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/addon-build/debug/install-root/better_sqlite3.node
→ /Users/user/web/permadi/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/addon-build/default/install-root/better_sqlite3.node



3 Replies
kapa.ai
kapa.ai3w ago
Hi @narr07. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the error message and configuration you've provided, it appears you're encountering an issue with Nuxt Content and its database configuration. Let's break down the problem and provide a possible solution: 1. The error suggests that the better-sqlite3 bindings file cannot be found. This is likely because you're trying to use SQLite on a platform where it's not properly installed or configured. 2. Your configuration is set to use Cloudflare D1 as the database:
content: {
database: {
type: 'd1',
binding: 'permadi'
}
},
hub: {
database: true,
}
content: {
database: {
type: 'd1',
binding: 'permadi'
}
},
hub: {
database: true,
}
This configuration is intended for use with Cloudflare Workers, not for local development. The d1 database type is specific to Cloudflare's D1 database service. To resolve this issue, you have a few options: 1. If you're developing locally and don't need Cloudflare D1 integration, you can remove the database configuration entirely. Nuxt Content will use its default SQLite configuration for local development. 2. If you need to use Cloudflare D1 for development, you'll need to set up a local D1 database and configure your environment properly. This is more complex and typically not necessary for local development. 3. If you're deploying to Cloudflare Workers, make sure you're using the correct build command and environment. For local development, I recommend removing the database configuration from your nuxt.config.ts file. Your configuration should look something like this:
export default defineNuxtConfig({
modules: ['@nuxt/content'],
// Remove the content and hub configurations
})
export default defineNuxtConfig({
modules: ['@nuxt/content'],
// Remove the content and hub configurations
})
After making this change, try running your Nuxt application again. If you still encounter issues, you may need to: 1. Delete the .nuxt directory 2. Clear your node_modules (rm -rf node_modules) 3. Reinstall your dependencies (npm install or yarn or pnpm install) 4. Run your Nuxt application again If the problem persists, it might be related to your Node.js version or system configuration. In that case, you may want to check your Node.js version and ensure it's compatible with the version of Nuxt Content you're using. For more information on configuring Nuxt Content, you can refer to the Nuxt Content Configuration documentation. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai3w ago
<@548889068805554211> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
narr07
narr07OP3w ago
Not solve

Did you find this page helpful?