Error: Cannot find module 'source-map-support/register'
Opened this issue · 2 comments
cfjedimaster commented
Not sure what to add here but that's the error I get. Here's the entirety of the code:
process.loadEnvFile();
import { Table } from 'voici.js';
const API_KEY = process.env.GOOGLE_AI_KEY;
(async () => {
let modelReq = await fetch(`https://generativelanguage.googleapis.com/v1beta/models?key=${API_KEY}`);
let models = await modelReq.json();
const table = new Table(models);
table.print();
})();
Full stacktrace:
node:internal/modules/cjs/loader:1142
const err = new Error(message);
^
Error: Cannot find module 'source-map-support/register'
Require stack:
- /home/ray/projects/ai-testingzone/get_google_models/node_modules/voici.js/dist/index.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1142:15)
at Module._load (node:internal/modules/cjs/loader:983:27)
at Module.require (node:internal/modules/cjs/loader:1230:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (/home/ray/projects/ai-testingzone/get_google_models/node_modules/voici.js/dist/index.js:4:1)
at Module._compile (node:internal/modules/cjs/loader:1368:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1426:10)
at Module.load (node:internal/modules/cjs/loader:1205:32)
at Module._load (node:internal/modules/cjs/loader:1021:12)
at cjsLoader (node:internal/modules/esm/translators:366:17) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/ray/projects/ai-testingzone/get_google_models/node_modules/voici.js/dist/index.js'
]
}
aaarichter commented
Getting the same error - source-map-support
is declared as dev dependency but is used in the dist files
@cfjedimaster a workaround is ad source-map-support
to your project's dependencies or dev dependencies
larswaechter commented
Thanks for your feedback! I'll fix it at the end of next week when I'm back from vacation