Kononnable/typeorm-model-generator

Was Working A Few Weeks Ago - now getting error - Missing Modules

Closed this issue · 3 comments

typeorm-model-generator was previously working perfectly on my MacBook. Now when I try to run, and choose a database (any database) I get the following error:
Cannot find module 'mssql'
Require stack:

  • /usr/local/lib/node_modules/typeorm-model-generator/dist/src/drivers/MssqlDriver.js
  • /usr/local/lib/node_modules/typeorm-model-generator/dist/src/Engine.js
  • /usr/local/lib/node_modules/typeorm-model-generator/dist/src/index.js
  • /usr/local/lib/node_modules/typeorm-model-generator/bin/typeorm-model-generator

I tried reinstalling (npx) on another Mac and get a similar error - Module_Not_Found - missing the same drivers on that machine as well. Did something change in the version?

I've accidentally pushed no-engines version under latest tag. This should be fixed now.

Still doesn't work on my MacBook, but lots of new errors - this is from the terminal window. It does work correctly on my iMac, so not an urgent issue.

Let me know if you'd like the entire log dump:

No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 20.2.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/kurtjohnson/.npm/_npx/669/lib/node_modules/typeorm-model-generator/node_modules/sqlite3/lib/binding/napi-v6-darwin-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/Users/kurtjohnson/.npm/_npx/669/lib/node_modules/typeorm-model-generator/node_modules/sqlite3/lib/binding/napi-v6-darwin-x64" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=6" "--node_napi_label=napi-v6"
gyp ERR! cwd /Users/kurtjohnson/.npm/_npx/669/lib/node_modules/typeorm-model-generator/node_modules/sqlite3
gyp ERR! node -v v12.18.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/kurtjohnson/.npm/_npx/669/lib/node_modules/typeorm-model-generator/node_modules/sqlite3/lib/binding/napi-v6-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/kurtjohnson/.npm/_npx/669/lib/node_modules/typeorm-model-generator/node_modules/sqlite3/lib/binding/napi-v6-darwin-x64 --napi_version=6 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
node-pre-gyp ERR! stack at ChildProcess. (/Users/kurtjohnson/.npm/_npx/669/lib/node_modules/typeorm-model-generator/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Darwin 20.2.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/kurtjohnson/.npm/_npx/669/lib/node_modules/typeorm-model-generator/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/kurtjohnson/.npm/_npx/669/lib/node_modules/typeorm-model-generator/node_modules/sqlite3
node-pre-gyp ERR! node -v v12.18.3
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3@5.0.1 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3@5.0.1 install 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/kurtjohnson/.npm/_logs/2021-01-20T15_06_45_074Z-debug.log
Install for [ 'typeorm-model-generator@latest' ] failed with code 1

It looks like it's related to node-gyp not being able to find necessary components to build sqlite driver. I guess XCode is required for MacBooks, but I haven't used one with nodejs, so it's just a guess. Requirements for it to work should be available somewhere in node-gyp repo.

gyp: No Xcode or CLT version detected!