Error with command in the bookshelf folder: npm test
mohamedmehdigara opened this issue · 3 comments
PS C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf> npm test
test
mocha --timeout=8000 --exit **/*.test.js
App listening on port 8080
Requests have valid status codes
1) should get books
Should have logs and errors endpoints as described in docs for Stackdriver
Hey, you triggered a custom log entry. Good job!
Error: Test exception
at C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\app.js:33:9
at Layer.handle [as handle_request] (C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\node_modules\express\lib\router\layer.js:95:5)
at next (C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\node_modules\express\lib\router\route.js:137:13)
at Route.dispatch (C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\node_modules\express\lib\router\layer.js:95:5)
at C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\node_modules\express\lib\router\index.js:281:22
at Function.process_params (C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\node_modules\express\lib\router\index.js:341:12)
at next (C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\node_modules\express\lib\router\index.js:275:10)
at expressInit (C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\node_modules\express\lib\middleware\init.js:40:5)
at Layer.handle [as handle_request] (C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\node_modules\express\lib\router\index.js:323:13)
at C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\node_modules\express\lib\router\index.js:284:7
at Function.process_params (C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\node_modules\express\lib\router\index.js:341:12)
at next (C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\node_modules\express\lib\router\index.js:275:10)
at query (C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\node_modules\express\lib\middleware\query.js:45:5)
at Layer.handle [as handle_request] (C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\node_modules\express\lib\router\index.js:323:13)
at C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\node_modules\express\lib\router\index.js:284:7
at Function.process_params (C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\node_modules\express\lib\router\index.js:341:12)
at next (C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\node_modules\express\lib\router\index.js:275:10)
at Function.handle (C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\node_modules\express\lib\router\index.js:174:3)
at Function.handle (C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\node_modules\express\lib\application.js:174:10)
at Server.app (C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\node_modules\express\lib\express.js:39:9)
at Server.emit (node:events:390:28)
at parserOnIncoming (node:_http_server:951:12)
at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
4 passing (10s)
1 failing
- Requests have valid status codes
should get books:
Error: Timeout of 8000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf\test\app.test.js)
at listOnTimeout (node:internal/timers:557:17)
at processTimers (node:internal/timers:500:7)
PS C:\Users\Admin\Downloads\nodejs-getting-started\bookshelf>
Hi @mohamedmehdigara, would you mind providing more details about your environment (Node version, library version, etc.)? I was unable to reproduce your issue.
Hi. Environment: Windows 10
Node version: v16.13.1
After investigating a bit, turns out that you need to be logged into a project with a firebase account. Could you try either enabling firestore, or opening a new project with Firestore enabled?