mike-works / sql-fundamentals

Mike North's SQL Fundamentals and Professional SQL Courses
https://frontendmasters.com/courses/sql-fundamentals/
BSD 3-Clause "New" or "Revised" License
169 stars 108 forks source link

How do I confirm if the app is set up correctly [SQLite]? #62

Closed jtt-berkeley closed 6 years ago

jtt-berkeley commented 6 years ago

Based on the video and description on Github, I am unsure to confirm if the app is set up correctly. How do I confirm if the app is set up correctly? If, after executing the command (npm run test — EX00), I am ejected back to a blank command line input prompt? At the end of my test, I ran into ERR! namely npm ERR! Failed at the mikeworks-sql@0.0.0 test script. Does this mean the app has failed or is correctly set up?

mikeworks-sql@0.0.0 test /Users/Mac/sql scripty "EX00"

Executing "/Users/Mac/sql/scripts/test/index.sh":

!/usr/bin/env sh

if [ -z "$TRAVIS_BRANCH" ] then git_branch=$(git symbolic-ref --short -q HEAD) else git_branch=$TRAVIS_BRANCH fi
echo "Git Branch: $git_branch"

if [ $1 ] then filter=$1 else case $git_branch in master) filter="EX00" ;; solutions-fundamentals) filter="EX0[0-9]|10" ;; solutions-pro) filter="EX" break ;; *) filter="EX00" break ;; esac fi echo "Test Filter: $filter"

if [ ( $git_branch = 'solution' ) ] && [ ( $filter = 'EX000' ) ] then echo "Solutions branch with no filter" NODE_ENV=test ./node_modules/.bin/mocha $1 $2 $3 else echo "Applying Test Filter: $filter" NODE_ENV=test ./node_modules/.bin/mocha --grep $filter $2 $3 fi

Git Branch: master Test Filter: EX00 Applying Test Filter: EX00 info: Database Type: SQLite warn: Skipping materializedViewsPresent for SQLite warn: Skipping postgresProductIndicesPresent for SQLite warn: Skipping mySQLGeneratedColumnsPresent for SQLite warn: Skipping metadataIsObject for SQLite warn: Skipping newProductsStartEmpty for SQLite warn: Skipping metadataUpdatesPersist for SQLite warn: Skipping sweetSourFilter for SQLite warn: Skipping sweetHotFilter for SQLite warn: Skipping tagsIsArray for SQLite warn: Skipping newProductsStartEmpty for SQLite warn: Skipping tagUpdatesPersist for SQLite warn: Skipping tagFilter for SQLite warn: Skipping dryResults for SQLite

EX00: Initial Dashboard Queries 1) Product leaderboard query 2) Employee leaderboard query 3) Customer leaderboard query 4) Reorder list 5) Recent Orders

EX00: Initial DB queries 6) Get all employees 7) Get all products 8) Get products needing reorder 9) Get discontinued products 10) Get all orders 11) Get all customers 12) Get all suppliers 13) Get one employee 14) Get one order 15) Get one product 16) Get one supplier 17) Get one customer

18) "after all" hook

0 passing (223ms) 18 failing

1) EX00: Initial Dashboard Queries Product leaderboard query: Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node' at require (internal/module.js:11:18) at Object. (node_modules/sqlite/node_modules/sqlite3/lib/sqlite3.js:4:15) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (node_modules/sqlite/main.js:5:31) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (src/db/sqlite-db.ts:4:1) at Module.m._compile (node_modules/ts-node/src/index.ts:396:23) at Object.require.extensions.(anonymous function) [as .ts] (node_modules/ts-node/src/index.ts:399:12) at require (internal/module.js:11:18) at Object. (src/db/utils.ts:50:22) at Generator.next () at src/db/utils.ts:7:71 at Promise () at awaiter (src/db/utils.ts:3:12) at Object.getDb (src/db/utils.ts:45:12) at Object. (src/data/dashboard.js:41:18) at Generator.next () at src/data/dashboard.js:7:71 at Promise () at awaiter (src/data/dashboard.js:3:12) at Object.getProductSalesLeaderboard (src/data/dashboard.js:54:12) at InitialDashboardQueriesTest. (test/ex00.initial-dashboard.test.ts:19:24) at Generator.next () at test/ex00.initial-dashboard.test.ts:13:71 at Promise () at __awaiter (test/ex00.initial-dashboard.test.ts:9:12) at InitialDashboardQueriesTest.productLeaderboardTest (test/ex00.initial-dashboard.test.ts:24:16) at Context. (node_modules/mocha-typescript/index.ts:218:22)

2) EX00: Initial Dashboard Queries Employee leaderboard query: Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node' at require (internal/module.js:11:18) at Object. (node_modules/sqlite/node_modules/sqlite3/lib/sqlite3.js:4:15) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (node_modules/sqlite/main.js:5:31) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (src/db/sqlite-db.ts:4:1) at Module.m._compile (node_modules/ts-node/src/index.ts:396:23) at Object.require.extensions.(anonymous function) [as .ts] (node_modules/ts-node/src/index.ts:399:12) at require (internal/module.js:11:18) at Object. (src/db/utils.ts:50:22) at Generator.next () at src/db/utils.ts:7:71 at Promise () at awaiter (src/db/utils.ts:3:12) at Object.getDb (src/db/utils.ts:45:12) at Object. (src/data/dashboard.js:8:18) at Generator.next () at src/data/dashboard.js:7:71 at Promise () at awaiter (src/data/dashboard.js:3:12) at Object.getEmployeeSalesLeaderboard (src/data/dashboard.js:17:12) at InitialDashboardQueriesTest. (test/ex00.initial-dashboard.test.ts:33:24) at Generator.next () at test/ex00.initial-dashboard.test.ts:13:71 at Promise () at __awaiter (test/ex00.initial-dashboard.test.ts:9:12) at InitialDashboardQueriesTest.employeeLeaderboardTest (test/ex00.initial-dashboard.test.ts:35:16) at Context. (node_modules/mocha-typescript/index.ts:218:22)

3) EX00: Initial Dashboard Queries Customer leaderboard query: Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node' at require (internal/module.js:11:18) at Object. (node_modules/sqlite/node_modules/sqlite3/lib/sqlite3.js:4:15) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (node_modules/sqlite/main.js:5:31) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (src/db/sqlite-db.ts:4:1) at Module.m._compile (node_modules/ts-node/src/index.ts:396:23) at Object.require.extensions.(anonymous function) [as .ts] (node_modules/ts-node/src/index.ts:399:12) at require (internal/module.js:11:18) at Object. (src/db/utils.ts:50:22) at Generator.next () at src/db/utils.ts:7:71 at Promise () at awaiter (src/db/utils.ts:3:12) at Object.getDb (src/db/utils.ts:45:12) at Object. (src/data/dashboard.js:24:18) at Generator.next () at src/data/dashboard.js:7:71 at Promise () at awaiter (src/data/dashboard.js:3:12) at Object.getCustomerSalesLeaderboard (src/data/dashboard.js:35:12) at InitialDashboardQueriesTest. (test/ex00.initial-dashboard.test.ts:47:24) at Generator.next () at test/ex00.initial-dashboard.test.ts:13:71 at Promise () at __awaiter (test/ex00.initial-dashboard.test.ts:9:12) at InitialDashboardQueriesTest.customerLeaderboardTest (test/ex00.initial-dashboard.test.ts:46:16) at Context. (node_modules/mocha-typescript/index.ts:218:22)

4) EX00: Initial Dashboard Queries Reorder list: Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node' at require (internal/module.js:11:18) at Object. (node_modules/sqlite/node_modules/sqlite3/lib/sqlite3.js:4:15) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (node_modules/sqlite/main.js:5:31) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (src/db/sqlite-db.ts:4:1) at Module.m._compile (node_modules/ts-node/src/index.ts:396:23) at Object.require.extensions.(anonymous function) [as .ts] (node_modules/ts-node/src/index.ts:399:12) at require (internal/module.js:11:18) at Object. (src/db/utils.ts:50:22) at Generator.next () at src/db/utils.ts:7:71 at Promise () at awaiter (src/db/utils.ts:3:12) at Object.getDb (src/db/utils.ts:45:12) at Object. (src/data/dashboard.js:78:18) at Generator.next () at src/data/dashboard.js:7:71 at Promise () at awaiter (src/data/dashboard.js:3:12) at Object.getReorderList (src/data/dashboard.js:95:12) at InitialDashboardQueriesTest. (test/ex00.initial-dashboard.test.ts:61:24) at Generator.next () at test/ex00.initial-dashboard.test.ts:13:71 at Promise () at __awaiter (test/ex00.initial-dashboard.test.ts:9:12) at InitialDashboardQueriesTest.reorderListTest (test/ex00.initial-dashboard.test.ts:57:16) at Context. (node_modules/mocha-typescript/index.ts:218:22)

5) EX00: Initial Dashboard Queries Recent Orders: Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node' at require (internal/module.js:11:18) at Object. (node_modules/sqlite/node_modules/sqlite3/lib/sqlite3.js:4:15) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (node_modules/sqlite/main.js:5:31) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (src/db/sqlite-db.ts:4:1) at Module.m._compile (node_modules/ts-node/src/index.ts:396:23) at Object.require.extensions.(anonymous function) [as .ts] (node_modules/ts-node/src/index.ts:399:12) at require (internal/module.js:11:18) at Object. (src/db/utils.ts:50:22) at Generator.next () at src/db/utils.ts:7:71 at Promise () at awaiter (src/db/utils.ts:3:12) at Object.getDb (src/db/utils.ts:45:12) at Object. (src/data/dashboard.js:58:18) at Generator.next () at src/data/dashboard.js:7:71 at Promise () at awaiter (src/data/dashboard.js:3:12) at Object.getRecentOrders (src/data/dashboard.js:73:12) at InitialDashboardQueriesTest. (test/ex00.initial-dashboard.test.ts:79:24) at Generator.next () at test/ex00.initial-dashboard.test.ts:13:71 at Promise () at __awaiter (test/ex00.initial-dashboard.test.ts:9:12) at InitialDashboardQueriesTest.recentOrdersTest (test/ex00.initial-dashboard.test.ts:68:16) at Context. (node_modules/mocha-typescript/index.ts:218:22)

6) EX00: Initial DB queries Get all employees: Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node' at require (internal/module.js:11:18) at Object. (node_modules/sqlite/node_modules/sqlite3/lib/sqlite3.js:4:15) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (node_modules/sqlite/main.js:5:31) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (src/db/sqlite-db.ts:4:1) at Module.m._compile (node_modules/ts-node/src/index.ts:396:23) at Object.require.extensions.(anonymous function) [as .ts] (node_modules/ts-node/src/index.ts:399:12) at require (internal/module.js:11:18) at Object. (src/db/utils.ts:50:22) at Generator.next () at src/db/utils.ts:7:71 at Promise () at awaiter (src/db/utils.ts:3:12) at Object.getDb (src/db/utils.ts:45:12) at Object. (src/data/employees.js:14:20) at Generator.next () at src/data/employees.js:7:71 at Promise () at awaiter (src/data/employees.js:3:12) at Object.getAllEmployees (src/data/employees.js:22:12) at InitialListQueriesTest. (test/ex00.initial-queries.test.ts:29:24) at Generator.next () at test/ex00.initial-queries.test.ts:13:71 at Promise () at __awaiter (test/ex00.initial-queries.test.ts:9:12) at InitialListQueriesTest.allEmployees (test/ex00.initial-queries.test.ts:38:16) at Context. (node_modules/mocha-typescript/index.ts:218:22)

7) EX00: Initial DB queries Get all products: Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node' at require (internal/module.js:11:18) at Object. (node_modules/sqlite/node_modules/sqlite3/lib/sqlite3.js:4:15) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (node_modules/sqlite/main.js:5:31) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (src/db/sqlite-db.ts:4:1) at Module.m._compile (node_modules/ts-node/src/index.ts:396:23) at Object.require.extensions.(anonymous function) [as .ts] (node_modules/ts-node/src/index.ts:399:12) at require (internal/module.js:11:18) at Object. (src/db/utils.ts:50:22) at Generator.next () at src/db/utils.ts:7:71 at Promise () at awaiter (src/db/utils.ts:3:12) at Object.getDb (src/db/utils.ts:45:12) at Object. (src/data/products.js:42:20) at Generator.next () at src/data/products.js:7:71 at Promise () at awaiter (src/data/products.js:3:12) at Object.getAllProducts (src/data/products.js:46:12) at InitialListQueriesTest. (test/ex00.initial-queries.test.ts:41:24) at Generator.next () at test/ex00.initial-queries.test.ts:13:71 at Promise () at __awaiter (test/ex00.initial-queries.test.ts:9:12) at InitialListQueriesTest.allProducts (test/ex00.initial-queries.test.ts:46:16) at Context. (node_modules/mocha-typescript/index.ts:218:22)

8) EX00: Initial DB queries Get products needing reorder: Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node' at require (internal/module.js:11:18) at Object. (node_modules/sqlite/node_modules/sqlite3/lib/sqlite3.js:4:15) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (node_modules/sqlite/main.js:5:31) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (src/db/sqlite-db.ts:4:1) at Module.m._compile (node_modules/ts-node/src/index.ts:396:23) at Object.require.extensions.(anonymous function) [as .ts] (node_modules/ts-node/src/index.ts:399:12) at require (internal/module.js:11:18) at Object. (src/db/utils.ts:50:22) at Generator.next () at src/db/utils.ts:7:71 at Promise () at awaiter (src/db/utils.ts:3:12) at Object.getDb (src/db/utils.ts:45:12) at Object. (src/data/products.js:42:20) at Generator.next () at src/data/products.js:7:71 at Promise () at awaiter (src/data/products.js:3:12) at Object.getAllProducts (src/data/products.js:46:12) at InitialListQueriesTest. (test/ex00.initial-queries.test.ts:57:24) at Generator.next () at test/ex00.initial-queries.test.ts:13:71 at Promise () at __awaiter (test/ex00.initial-queries.test.ts:9:12) at InitialListQueriesTest.productsNeedingReorder (test/ex00.initial-queries.test.ts:54:16) at Context. (node_modules/mocha-typescript/index.ts:218:22)

9) EX00: Initial DB queries Get discontinued products: Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node' at require (internal/module.js:11:18) at Object. (node_modules/sqlite/node_modules/sqlite3/lib/sqlite3.js:4:15) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (node_modules/sqlite/main.js:5:31) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (src/db/sqlite-db.ts:4:1) at Module.m._compile (node_modules/ts-node/src/index.ts:396:23) at Object.require.extensions.(anonymous function) [as .ts] (node_modules/ts-node/src/index.ts:399:12) at require (internal/module.js:11:18) at Object. (src/db/utils.ts:50:22) at Generator.next () at src/db/utils.ts:7:71 at Promise () at awaiter (src/db/utils.ts:3:12) at Object.getDb (src/db/utils.ts:45:12) at Object. (src/data/products.js:42:20) at Generator.next () at src/data/products.js:7:71 at Promise () at awaiter (src/data/products.js:3:12) at Object.getAllProducts (src/data/products.js:46:12) at InitialListQueriesTest. (test/ex00.initial-queries.test.ts:79:24) at Generator.next () at test/ex00.initial-queries.test.ts:13:71 at Promise () at __awaiter (test/ex00.initial-queries.test.ts:9:12) at InitialListQueriesTest.discontinuedProducts (test/ex00.initial-queries.test.ts:72:16) at Context. (node_modules/mocha-typescript/index.ts:218:22)

10) EX00: Initial DB queries Get all orders: Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node' at require (internal/module.js:11:18) at Object. (node_modules/sqlite/node_modules/sqlite3/lib/sqlite3.js:4:15) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (node_modules/sqlite/main.js:5:31) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (src/db/sqlite-db.ts:4:1) at Module.m._compile (node_modules/ts-node/src/index.ts:396:23) at Object.require.extensions.(anonymous function) [as .ts] (node_modules/ts-node/src/index.ts:399:12) at require (internal/module.js:11:18) at Object. (src/db/utils.ts:50:22) at Generator.next () at src/db/utils.ts:7:71 at Promise () at awaiter (src/db/utils.ts:3:12) at Object.getDb (src/db/utils.ts:45:12) at Object. (src/data/orders.js:45:20) at Generator.next () at src/data/orders.js:7:71 at Promise () at awaiter (src/data/orders.js:3:12) at Object.getAllOrders (src/data/orders.js:42:12) at InitialListQueriesTest. (test/ex00.initial-queries.test.ts:101:24) at Generator.next () at test/ex00.initial-queries.test.ts:13:71 at Promise () at __awaiter (test/ex00.initial-queries.test.ts:9:12) at InitialListQueriesTest.allOrders (test/ex00.initial-queries.test.ts:90:16) at Context. (node_modules/mocha-typescript/index.ts:218:22)

11) EX00: Initial DB queries Get all customers: Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node' at require (internal/module.js:11:18) at Object. (node_modules/sqlite/node_modules/sqlite3/lib/sqlite3.js:4:15) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (node_modules/sqlite/main.js:5:31) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (src/db/sqlite-db.ts:4:1) at Module.m._compile (node_modules/ts-node/src/index.ts:396:23) at Object.require.extensions.(anonymous function) [as .ts] (node_modules/ts-node/src/index.ts:399:12) at require (internal/module.js:11:18) at Object. (src/db/utils.ts:50:22) at Generator.next () at src/db/utils.ts:7:71 at Promise () at awaiter (src/db/utils.ts:3:12) at Object.getDb (src/db/utils.ts:45:12) at Object. (src/data/customers.js:24:20) at Generator.next () at src/data/customers.js:7:71 at Promise () at awaiter (src/data/customers.js:3:12) at Object.getAllCustomers (src/data/customers.js:31:12) at InitialListQueriesTest. (test/ex00.initial-queries.test.ts:117:24) at Generator.next () at test/ex00.initial-queries.test.ts:13:71 at Promise () at __awaiter (test/ex00.initial-queries.test.ts:9:12) at InitialListQueriesTest.allCustomers (test/ex00.initial-queries.test.ts:98:16) at Context. (node_modules/mocha-typescript/index.ts:218:22)

12) EX00: Initial DB queries Get all suppliers: Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node' at require (internal/module.js:11:18) at Object. (node_modules/sqlite/node_modules/sqlite3/lib/sqlite3.js:4:15) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (node_modules/sqlite/main.js:5:31) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (src/db/sqlite-db.ts:4:1) at Module.m._compile (node_modules/ts-node/src/index.ts:396:23) at Object.require.extensions.(anonymous function) [as .ts] (node_modules/ts-node/src/index.ts:399:12) at require (internal/module.js:11:18) at Object. (src/db/utils.ts:50:22) at Generator.next () at src/db/utils.ts:7:71 at Promise () at awaiter (src/db/utils.ts:3:12) at Object.getDb (src/db/utils.ts:45:12) at Object. (src/data/suppliers.js:14:20) at Generator.next () at src/data/suppliers.js:7:71 at Promise () at awaiter (src/data/suppliers.js:3:12) at Object.getAllSuppliers (src/data/suppliers.js:22:12) at InitialListQueriesTest. (test/ex00.initial-queries.test.ts:133:24) at Generator.next () at test/ex00.initial-queries.test.ts:13:71 at Promise () at __awaiter (test/ex00.initial-queries.test.ts:9:12) at InitialListQueriesTest.allSuppliers (test/ex00.initial-queries.test.ts:106:16) at Context. (node_modules/mocha-typescript/index.ts:218:22)

13) EX00: Initial DB queries Get one employee: Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node' at require (internal/module.js:11:18) at Object. (node_modules/sqlite/node_modules/sqlite3/lib/sqlite3.js:4:15) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (node_modules/sqlite/main.js:5:31) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (src/db/sqlite-db.ts:4:1) at Module.m._compile (node_modules/ts-node/src/index.ts:396:23) at Object.require.extensions.(anonymous function) [as .ts] (node_modules/ts-node/src/index.ts:399:12) at require (internal/module.js:11:18) at Object. (src/db/utils.ts:50:22) at Generator.next () at src/db/utils.ts:7:71 at Promise () at awaiter (src/db/utils.ts:3:12) at Object.getDb (src/db/utils.ts:45:12) at Object. (src/data/employees.js:26:20) at Generator.next () at src/data/employees.js:7:71 at Promise () at awaiter (src/data/employees.js:3:12) at Object.getEmployee (src/data/employees.js:36:12) at InitialListQueriesTest. (test/ex00.initial-queries.test.ts:148:24) at Generator.next () at test/ex00.initial-queries.test.ts:13:71 at Promise () at __awaiter (test/ex00.initial-queries.test.ts:9:12) at InitialListQueriesTest.getEmployee (test/ex00.initial-queries.test.ts:114:16) at Context. (node_modules/mocha-typescript/index.ts:218:22)

14) EX00: Initial DB queries Get one order: Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node' at require (internal/module.js:11:18) at Object. (node_modules/sqlite/node_modules/sqlite3/lib/sqlite3.js:4:15) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (node_modules/sqlite/main.js:5:31) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (src/db/sqlite-db.ts:4:1) at Module.m._compile (node_modules/ts-node/src/index.ts:396:23) at Object.require.extensions.(anonymous function) [as .ts] (node_modules/ts-node/src/index.ts:399:12) at require (internal/module.js:11:18) at Object. (src/db/utils.ts:50:22) at Generator.next () at src/db/utils.ts:7:71 at Promise () at awaiter (src/db/utils.ts:3:12) at Object.getDb (src/db/utils.ts:45:12) at Object. (src/data/orders.js:67:20) at Generator.next () at src/data/orders.js:7:71 at Promise () at awaiter (src/data/orders.js:3:12) at Object.getOrder (src/data/orders.js:71:12) at InitialListQueriesTest. (test/ex00.initial-queries.test.ts:159:24) at Generator.next () at test/ex00.initial-queries.test.ts:13:71 at Promise () at __awaiter (test/ex00.initial-queries.test.ts:9:12) at InitialListQueriesTest.getOrder (test/ex00.initial-queries.test.ts:121:16) at Context. (node_modules/mocha-typescript/index.ts:218:22)

15) EX00: Initial DB queries Get one product: Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node' at require (internal/module.js:11:18) at Object. (node_modules/sqlite/node_modules/sqlite3/lib/sqlite3.js:4:15) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (node_modules/sqlite/main.js:5:31) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (src/db/sqlite-db.ts:4:1) at Module.m._compile (node_modules/ts-node/src/index.ts:396:23) at Object.require.extensions.(anonymous function) [as .ts] (node_modules/ts-node/src/index.ts:399:12) at require (internal/module.js:11:18) at Object. (src/db/utils.ts:50:22) at Generator.next () at src/db/utils.ts:7:71 at Promise () at awaiter (src/db/utils.ts:3:12) at Object.getDb (src/db/utils.ts:45:12) at Object. (src/data/products.js:54:20) at Generator.next () at src/data/products.js:7:71 at Promise () at awaiter (src/data/products.js:3:12) at Object.getProduct (src/data/products.js:60:12) at InitialListQueriesTest. (test/ex00.initial-queries.test.ts:170:24) at Generator.next () at test/ex00.initial-queries.test.ts:13:71 at Promise () at __awaiter (test/ex00.initial-queries.test.ts:9:12) at InitialListQueriesTest.getProduct (test/ex00.initial-queries.test.ts:128:16) at Context. (node_modules/mocha-typescript/index.ts:218:22)

16) EX00: Initial DB queries Get one supplier: Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node' at require (internal/module.js:11:18) at Object. (node_modules/sqlite/node_modules/sqlite3/lib/sqlite3.js:4:15) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (node_modules/sqlite/main.js:5:31) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (src/db/sqlite-db.ts:4:1) at Module.m._compile (node_modules/ts-node/src/index.ts:396:23) at Object.require.extensions.(anonymous function) [as .ts] (node_modules/ts-node/src/index.ts:399:12) at require (internal/module.js:11:18) at Object. (src/db/utils.ts:50:22) at Generator.next () at src/db/utils.ts:7:71 at Promise () at awaiter (src/db/utils.ts:3:12) at Object.getDb (src/db/utils.ts:45:12) at Object. (src/data/suppliers.js:26:20) at Generator.next () at src/data/suppliers.js:7:71 at Promise () at awaiter (src/data/suppliers.js:3:12) at Object.getSupplier (src/data/suppliers.js:36:12) at InitialListQueriesTest. (test/ex00.initial-queries.test.ts:181:24) at Generator.next () at test/ex00.initial-queries.test.ts:13:71 at Promise () at __awaiter (test/ex00.initial-queries.test.ts:9:12) at InitialListQueriesTest.getSupplier (test/ex00.initial-queries.test.ts:135:16) at Context. (node_modules/mocha-typescript/index.ts:218:22)

17) EX00: Initial DB queries Get one customer: Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node' at require (internal/module.js:11:18) at Object. (node_modules/sqlite/node_modules/sqlite3/lib/sqlite3.js:4:15) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (node_modules/sqlite/main.js:5:31) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (src/db/sqlite-db.ts:4:1) at Module.m._compile (node_modules/ts-node/src/index.ts:396:23) at Object.require.extensions.(anonymous function) [as .ts] (node_modules/ts-node/src/index.ts:399:12) at require (internal/module.js:11:18) at Object. (src/db/utils.ts:50:22) at Generator.next () at src/db/utils.ts:7:71 at Promise () at awaiter (src/db/utils.ts:3:12) at Object.getDb (src/db/utils.ts:45:12) at Object. (src/data/customers.js:38:20) at Generator.next () at src/data/customers.js:7:71 at Promise () at awaiter (src/data/customers.js:3:12) at Object.getCustomer (src/data/customers.js:47:12) at InitialListQueriesTest. (test/ex00.initial-queries.test.ts:192:24) at Generator.next () at test/ex00.initial-queries.test.ts:13:71 at Promise () at __awaiter (test/ex00.initial-queries.test.ts:9:12) at InitialListQueriesTest.getCustomer (test/ex00.initial-queries.test.ts:142:16) at Context. (node_modules/mocha-typescript/index.ts:218:22)

18) "after all" hook: Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node' at require (internal/module.js:11:18) at Object. (node_modules/sqlite/node_modules/sqlite3/lib/sqlite3.js:4:15) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (node_modules/sqlite/main.js:5:31) at Object.require.extensions.(anonymous function) [as .js] (node_modules/ts-node/src/index.ts:388:14) at require (internal/module.js:11:18) at Object. (src/db/sqlite-db.ts:4:1) at Module.m._compile (node_modules/ts-node/src/index.ts:396:23) at Object.require.extensions.(anonymous function) [as .ts] (node_modules/ts-node/src/index.ts:399:12) at require (internal/module.js:11:18) at Object. (src/db/utils.ts:50:22) at Generator.next () at src/db/utils.ts:7:71 at Promise () at __awaiter (src/db/utils.ts:3:12) at Object.getDb (src/db/utils.ts:45:12) at Context.after (test/helpers/global-hooks.ts:5:10)

npm ERR! code ELIFECYCLE npm ERR! errno 18 npm ERR! mikeworks-sql@0.0.0 test: scripty "EX00" npm ERR! Exit status 18 npm ERR! npm ERR! Failed at the mikeworks-sql@0.0.0 test script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/Mac/.npm/_logs/2018-08-19T18_04_38_404Z-debug.log

jtt-berkeley commented 6 years ago

Also, after issuing the command npm run watchthe app does not run (at http://localhost:3000) get the following output, leading me to believe the app is not running correctly:

~/sql $ npm run watch

> mikeworks-sql@0.0.0 watch /Users/Mac/sql
> scripty

Executing "/Users/Mac/sql/scripts/watch.sh":

> #!/usr/bin/env sh
> ./node_modules/.bin/nodemon -x "npm run build; npm start"
> 

[nodemon] 1.18.3
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: /Users/Mac/sql/src/**/* /Users/Mac/sql/views/**/* /Users/Mac/sql/public/**/*
[nodemon] starting `npm run build; npm start`

> mikeworks-sql@0.0.0 build /Users/Mac/sql
> scripty

Executing "/Users/Mac/sql/scripts/build.sh":

> #!/usr/bin/env sh
> ./node_modules/.bin/tsc

node_modules/@types/handlebars/index.d.ts(28,9): error TS2687: All declarations of 'data' must have identical modifiers.
src/db/postgres-db.ts(77,27): error TS2345: Argument of type 'PoolClient' is not assignable to parameter of type 'Client'.
src/db/postgres-db.ts(101,30): error TS2339: Property 'release' does not exist on type 'Client'.
src/db/postgres-pubsub.ts(6,3): error TS2322: Type 'PoolClient' is not assignable to type 'Client'.
  Property 'end' is missing in type 'PoolClient'.
src/types/handlebars.d.ts(13,5): error TS2717: Subsequent property declarations must have the same type.  Property 'hash' must be of type 'any', but here has type '{ [key: string]: any; }'.
src/types/handlebars.d.ts(14,5): error TS2717: Subsequent property declarations must have the same type.  Property 'fn' must be of type 'TemplateDelegate<any>', but here has type '(ctxt: any) => {}'.
src/types/handlebars.d.ts(15,5): error TS2687: All declarations of 'data' must have identical modifiers.
src/types/handlebars.d.ts(15,5): error TS2717: Subsequent property declarations must have the same type.  Property 'data' must be of type 'any', but here has type '{ exphbs: ExpHbsState; root: { settings: any; request: Request; }; }'.
src/ws.ts(54,19): error TS2345: Argument of type '(this: WebSocket) => void' is not assignable to parameter of type '(this: WebSocket, ...args: any[]) => void'.
  The 'this' types of each signature are incompatible.
    Type 'WebSocket' is not assignable to type 'WebSocket'. Two different types with this name exist, but they are unrelated.
      Property 'isAlive' is missing in type 'WebSocket'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! mikeworks-sql@0.0.0 build: `scripty`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the mikeworks-sql@0.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/Mac/.npm/_logs/2018-08-19T18_16_36_003Z-debug.log

> mikeworks-sql@0.0.0 start /Users/Mac/sql
> scripty

Executing "/Users/Mac/sql/scripts/start.sh":

> #!/usr/bin/env sh
> node dist/index.js

info: Database Type: SQLite
info: Server listening on http://localhost:3000
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 7): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 8): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 9): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 10): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 16): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 17): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 18): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 19): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 20): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 26): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 27): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 28): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 29): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 30): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 36): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 37): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 38): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 39): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 40): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 46): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 47): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 48): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 49): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 50): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 56): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 57): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 58): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 59): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 60): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 66): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 67): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 68): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 69): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
(node:48046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 70): Error: Cannot find module '/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
mike-north commented 6 years ago

Please delete your node_modules folder and reinstall from scratch. You're missing some part of the node-sqlite library.

jtt-berkeley commented 6 years ago

I deleted the node_modules directory. I then reinstalled from scratch. I then ran npm run db:setup:sqlite and ran into the following output

~/sql $ npm run db:setup:sqlite

> mikeworks-sql@0.0.0 db:setup:sqlite /Users/Mac/sql
> scripty

sh: scripty: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! mikeworks-sql@0.0.0 db:setup:sqlite: `scripty`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the mikeworks-sql@0.0.0 db:setup:sqlite script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/Mac/.npm/_logs/2018-08-20T05_11_36_445Z-debug.log
~/sql $ npm install

> fsevents@1.2.4 install /Users/Mac/sql/node_modules/fsevents
> node install

[fsevents] Success: "/Users/Mac/sql/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile

> sqlite3@4.0.0 install /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

I then ran npm run watch and got this output: `~/sql $ npm run watch

mikeworks-sql@0.0.0 watch /Users/Mac/sql scripty

Executing "/Users/Mac/sql/scripts/watch.sh":

!/usr/bin/env sh

./node_modules/.bin/nodemon -x "npm run build; npm start"

[nodemon] 1.18.3 [nodemon] to restart at any time, enter rs [nodemon] watching: /Users/Mac/sql/src//* /Users/Mac/sql/views/*/ /Users/Mac/sql/public//* [nodemon] starting npm run build; npm start

mikeworks-sql@0.0.0 build /Users/Mac/sql scripty

Executing "/Users/Mac/sql/scripts/build.sh":

!/usr/bin/env sh

./node_modules/.bin/tsc

node_modules/@types/handlebars/index.d.ts(28,9): error TS2687: All declarations of 'data' must have identical modifiers. src/db/postgres-db.ts(77,27): error TS2345: Argument of type 'PoolClient' is not assignable to parameter of type 'Client'. src/db/postgres-db.ts(101,30): error TS2339: Property 'release' does not exist on type 'Client'. src/db/postgres-pubsub.ts(6,3): error TS2322: Type 'PoolClient' is not assignable to type 'Client'. Property 'end' is missing in type 'PoolClient'. src/types/handlebars.d.ts(13,5): error TS2717: Subsequent property declarations must have the same type. Property 'hash' must be of type 'any', but here has type '{ [key: string]: any; }'. src/types/handlebars.d.ts(14,5): error TS2717: Subsequent property declarations must have the same type. Property 'fn' must be of type 'TemplateDelegate', but here has type '(ctxt: any) => {}'. src/types/handlebars.d.ts(15,5): error TS2687: All declarations of 'data' must have identical modifiers. src/types/handlebars.d.ts(15,5): error TS2717: Subsequent property declarations must have the same type. Property 'data' must be of type 'any', but here has type '{ exphbs: ExpHbsState; root: { settings: any; request: Request; }; }'. src/ws.ts(54,19): error TS2345: Argument of type '(this: WebSocket) => void' is not assignable to parameter of type '(this: WebSocket, ...args: any[]) => void'. The 'this' types of each signature are incompatible. Type 'WebSocket' is not assignable to type 'WebSocket'. Two different types with this name exist, but they are unrelated. Property 'isAlive' is missing in type 'WebSocket'. npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! mikeworks-sql@0.0.0 build: scripty npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the mikeworks-sql@0.0.0 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/Mac/.npm/_logs/2018-08-20T05_30_29_200Z-debug.log

mikeworks-sql@0.0.0 start /Users/Mac/sql scripty

Executing "/Users/Mac/sql/scripts/start.sh":

!/usr/bin/env sh

node dist/index.js

info: Database Type: SQLite info: Server listening on http://localhost:3000 (node:68445) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): Error: dlopen(/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node, 1): no suitable image found. Did find: /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 (node:68445) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:68445) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 7): Error: dlopen(/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node, 1): no suitable image found. Did find: /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 (node:68445) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 8): Error: dlopen(/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node, 1): no suitable image found. Did find: /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 (node:68445) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 9): Error: dlopen(/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node, 1): no suitable image found. Did find: /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 (node:68445) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 10): Error: dlopen(/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node, 1): no suitable image found. Did find: /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 (node:68445) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 16): Error: dlopen(/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node, 1): no suitable image found. Did find: /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 (node:68445) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 17): Error: dlopen(/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node, 1): no suitable image found. Did find: /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 (node:68445) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 18): Error: dlopen(/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node, 1): no suitable image found. Did find: /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 (node:68445) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 19): Error: dlopen(/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node, 1): no suitable image found. Did find: /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 (node:68445) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 20): Error: dlopen(/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node, 1): no suitable image found. Did find: /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 (node:68445) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 26): Error: dlopen(/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node, 1): no suitable image found. Did find: /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 (node:68445) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 27): Error: dlopen(/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node, 1): no suitable image found. Did find: /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 (node:68445) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 28): Error: dlopen(/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node, 1): no suitable image found. Did find: /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 (node:68445) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 29): Error: dlopen(/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node, 1): no suitable image found. Did find: /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment TEXT extends to 1576960 which is past end of file 378055 (node:68445) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 30): Error: dlopen(/Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node, 1): no suitable image found. Did find: /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment __TEXT extends to 1576960 which is past end of file 378055 /Users/Mac/sql/node_modules/sqlite/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node: truncated mach-o error: segment __TEXT extends to 1576960 which is past end of file 378055`

http://localhost:3000 stalls. Removing node_modules and reinstalling from scratch did not work. :(

I am going to go the PostgreSQL per your suggestion.

mike-north commented 6 years ago

Continued in #55