这是尝试启动我的react-Web应用程序的api端时的堆栈跟踪信息。
我已经多次遇到此错误,但是似乎再也无法修复!
/Users/joshua_paulsen/Desktop/Jump-In-Final/api/node_modules/pouchdb-core/lib/index.js:1285
throw new Error('Invalid Adapter: ' + opts.adapter);
^
Error: Invalid Adapter: undefined
at new PouchDB (/Users/joshua_paulsen/Desktop/Jump-In-Final/api/node_modules/pouchdb-core/lib/index.js:1285:11)
at Object.<anonymous> (/Users/joshua_paulsen/Desktop/Jump-In-Final/api/dal.js:18:12)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/Users/joshua_paulsen/Desktop/Jump-In-Final/api/routes/workouts/index.js:8:5)
答案 0 :(得分:0)
我的数据库是这样定义的-const db = new PouchDB(
${process.env.COUCH_HOSTNAME}${process.env.COUCH_DBNAME}
)
修复程序最终将其更改为此。
${process.env.COUCH_DBNAME}
,{适配器:“ http”})