Error: Cannot find module when running npm install sqlite3
maxis1718 opened this issue · 1 comments
maxis1718 commented
Failed to run moro
after installing the package globally, seems like that sqlite3
has to be installed globally as well.
macOS: 10.13.4
yarn: 1.6.0
node: v9.9.0
$ yarn global add moro
$ moro
_ Knex: run
$ npm install sqlite3 --save
Error: Cannot find module '/Users/maxis.kao/.config/yarn/global/node_modules/sqlite3/lib/binding/node-v64-darwin-x64/node_sqlite3.node'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:571:15)
at Function.Module._load (internal/modules/cjs/loader.js:497:25)
at Module.require (internal/modules/cjs/loader.js:626:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/Users/maxis.kao/.config/yarn/global/node_modules/sqlite3/lib/sqlite3.js:4:15)
at Module._compile (internal/modules/cjs/loader.js:678:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
at Module.load (internal/modules/cjs/loader.js:589:32)
at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
at Function.Module._load (internal/modules/cjs/loader.js:520:3)
at Module.require (internal/modules/cjs/loader.js:626:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Client_SQLite3._driver (/Users/maxis.kao/.config/yarn/global/node_modules/knex/lib/dialects/sqlite3/index.js:79:12)
at Client_SQLite3.initializeDriver (/Users/maxis.kao/.config/yarn/global/node_modules/knex/lib/client.js:254:26)
at Client_SQLite3.Client (/Users/maxis.kao/.config/yarn/global/node_modules/knex/lib/client.js:115:10)
at new Client_SQLite3 (/Users/maxis.kao/.config/yarn/global/node_modules/knex/lib/dialects/sqlite3/index.js:62:20)
albacoretuna commented
Should be fixed in #192