- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想连接到我的数据库 sqlite3。这在本地主机上运行良好,但在我部署到 zeit.co 时失败,出现错误:
Error: SQLITE_CANTOPEN: unable to open database
2020-02-13T07:50:40.031Z 4d5a9aed-ae26-4a09-903a-72aa08ca5140 ERROR Unhandled Promise Rejection {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"Error: SQLITE_CANTOPEN: unable to open database file","reason":{"errorType":"Error","errorMessage":"SQLITE_CANTOPEN: unable to open database file","code":"SQLITE_CANTOPEN","errno":14,"stack":["Error: SQLITE_CANTOPEN: unable to open database file"]},"promise":{"isFulfilled":false,"isRejected":true,"rejectionReason":{"errorType":"Error","errorMessage":"SQLITE_CANTOPEN: unable to open database file","code":"SQLITE_CANTOPEN","errno":14,"stack":["Error: SQLITE_CANTOPEN: unable to open database file"]}},"stack":["Runtime.UnhandledPromiseRejection: Error: SQLITE_CANTOPEN: unable to open database file"," at process. (/var/runtime/index.js:35:15)"," at process.emit (events.js:228:7)"," at eventToObjectGenerator.promiseCreated (/var/task/node_modules/bluebird/js/release/debuggability.js:258:33)"," at activeFireEvent (/var/task/node_modules/bluebird/js/release/debuggability.js:301:44)"," at fireRejectionEvent (/var/task/node_modules/bluebird/js/release/debuggability.js:703:14)"," at Promise._notifyUnhandledRejection (/var/task/node_modules/bluebird/js/release/debuggability.js:90:9)"," at Timeout.unhandledRejectionCheck [as _onTimeout] (/var/task/node_modules/bluebird/js/release/debuggability.js:39:25)"," at listOnTimeout (internal/timers.js:531:17)"," at processTimers (internal/timers.js:475:7)"]} Unknown application error occurred
const fs = require('fs');
const path = require('path');
const DBSOURCE = path.join(__dirname, 'mydb.sqlite');
const knex = require('knex')({
client: 'sqlite3',
connection: {
filename: DBSOURCE
}
});
const DBSOURCE = 'mydb.sqlite'
; const DBSOURCE = path.resolve(__dirname, 'mydb.sqlite');
最佳答案
对于那些从谷歌这里绊倒的人,Zeit 现在是 Vercel,并且有一个在无服务器环境中使用 MySQL 的更新示例。
https://github.com/vercel/next.js/tree/canary/examples/with-mysql
关于node.js - 如何修复错误 : SQLITE_CANTOPEN: unable to open database on Zeit. co?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60202995/
我正在尝试在选定的文件夹中创建一个 Sqlite 数据库,但无法执行此操作。 操作系统 - Windows,编辑器 - Visual studio,progect 编码为 unicode。数据库连
我想连接到我的数据库 sqlite3。这在本地主机上运行良好,但在我部署到 zeit.co 时失败,出现错误: Error: SQLITE_CANTOPEN: unable to open datab
我运行了以下命令: $ meteor create myapp 并收到以下错误消息: Retrying after error { [Error: SQLITE_CANTOPEN: unable to
我正在尝试在我的 Angular + Electron 应用程序中使用 node-sqlite3 打开 sqlite 数据库文件。 尽管我确保该文件存在并且 Electron 可以读取它,但当我尝试使
我在网站上阅读了有关此问题的各种内容,但我无法弄清楚这一点。我被这一步卡住了好久。我该如何解决这个问题 Logcat 输出 根据logcat,这是由SQLiteCantOpenDatabaseExce
我是一名优秀的程序员,十分优秀!