Closed leanjunio closed 1 year ago
I was getting the following error on master so I added the missing dependency
master
➜ etro git:(b46da40) npm test > etro@0.9.1 test > karma start 17 04 2023 06:47:54.289:INFO [compiler.karma-typescript]: Compiling project using Typescript 4.7.4 17 04 2023 06:47:56.417:INFO [compiler.karma-typescript]: Compiled 64 files in 2090 ms. 17 04 2023 06:47:56.960:ERROR [karma-server]: UncaughtException: Error: Unable to resolve module [canvas] from [/home/leanjunio/Documents/work/open-source/etro/node_modules/resemblejs/resemble.js] { "basedir": "/home/leanjunio/Documents/work/open-source/etro", "extensions": [ ".js", ".json", ".mjs", ".ts", ".tsx" ], "moduleDirectory": [ "node_modules" ], "modules": { "assert": "/home/leanjunio/Documents/work/open-source/etro/node_modules/assert/build/assert.js", "buffer": "/home/leanjunio/Documents/work/open-source/etro/node_modules/buffer/index.js", "child_process": "/home/leanjunio/Documents/work/open-source/etro/node_modules/karma-typescript/dist/bundler/resolve/empty.js", "cluster": "/home/leanjunio/Documents/work/open-source/etro/node_modules/karma-typescript/dist/bundler/resolve/empty.js", "console": "/home/leanjunio/Documents/work/open-source/etro/node_modules/console-browserify/index.js", "constants": "/home/leanjunio/Documents/work/open-source/etro/node_modules/constants-browserify/constants.json", "crypto": "/home/leanjunio/Documents/work/open-source/etro/node_modules/crypto-browserify/index.js", "dgram": "/home/leanjunio/Documents/work/open-source/etro/node_modules/karma-typescript/dist/bundler/resolve/empty.js", "dns": "/home/leanjunio/Documents/work/open-source/etro/node_modules/karma-typescript/dist/bundler/resolve/empty.js", "domain": "/home/leanjunio/Documents/work/open-source/etro/node_modules/domain-browser/source/index.js", "events": "/home/leanjunio/Documents/work/open-source/etro/node_modules/events/events.js", "fs": "/home/leanjunio/Documents/work/open-source/etro/node_modules/karma-typescript/dist/bundler/resolve/empty.js", "http": "/home/leanjunio/Documents/work/open-source/etro/node_modules/stream-http/index.js", "https": "/home/leanjunio/Documents/work/open-source/etro/node_modules/https-browserify/index.js", "module": "/home/leanjunio/Documents/work/open-source/etro/node_modules/karma-typescript/dist/bundler/resolve/empty.js", "net": "/home/leanjunio/Documents/work/open-source/etro/node_modules/karma-typescript/dist/bundler/resolve/empty.js", "os": "/home/leanjunio/Documents/work/open-source/etro/node_modules/os-browserify/browser.js", "path": "/home/leanjunio/Documents/work/open-source/etro/node_modules/path-browserify/index.js", "punycode": "/home/leanjunio/Documents/work/open-source/etro/node_modules/punycode/punycode.js", "querystring": "/home/leanjunio/Documents/work/open-source/etro/node_modules/querystring-es3/index.js", "readline": "/home/leanjunio/Documents/work/open-source/etro/node_modules/karma-typescript/dist/bundler/resolve/empty.js", "repl": "/home/leanjunio/Documents/work/open-source/etro/node_modules/karma-typescript/dist/bundler/resolve/empty.js", "stream": "/home/leanjunio/Documents/work/open-source/etro/node_modules/stream-browserify/index.js", "_stream_duplex": "/home/leanjunio/Documents/work/open-source/etro/node_modules/readable-stream/lib/_stream_duplex.js", "_stream_passthrough": "/home/leanjunio/Documents/work/open-source/etro/node_modules/readable-stream/lib/_stream_passthrough.js", "_stream_readable": "/home/leanjunio/Documents/work/open-source/etro/node_modules/readable-stream/lib/_stream_readable.js", "_stream_transform": "/home/leanjunio/Documents/work/open-source/etro/node_modules/readable-stream/lib/_stream_transform.js", "_stream_writable": "/home/leanjunio/Documents/work/open-source/etro/node_modules/readable-stream/lib/_stream_writable.js", "string_decoder": "/home/leanjunio/Documents/work/open-source/etro/node_modules/string_decoder/lib/string_decoder.js", "sys": "/home/leanjunio/Documents/work/open-source/etro/node_modules/util/util.js", "timers": "/home/leanjunio/Documents/work/open-source/etro/node_modules/timers-browserify/main.js", "tls": "/home/leanjunio/Documents/work/open-source/etro/node_modules/karma-typescript/dist/bundler/resolve/empty.js", "tty": "/home/leanjunio/Documents/work/open-source/etro/node_modules/tty-browserify/index.js", "url": "/home/leanjunio/Documents/work/open-source/etro/node_modules/url/url.js", "util": "/home/leanjunio/Documents/work/open-source/etro/node_modules/util/util.js", "vm": "/home/leanjunio/Documents/work/open-source/etro/node_modules/vm-browserify/index.js", "zlib": "/home/leanjunio/Documents/work/open-source/etro/node_modules/browserify-zlib/lib/index.js", "_process": "/home/leanjunio/Documents/work/open-source/etro/node_modules/process/browser.js" }, "filename": "", "paths": [ "/home/leanjunio/.node_modules", "/home/leanjunio/.node_libraries" ] } Error: Cannot find module 'canvas' from '/home/leanjunio/Documents/work/open-source/etro/node_modules/resemblejs/resemble.js' at /home/leanjunio/Documents/work/open-source/etro/node_modules/karma-typescript/dist/bundler/resolve/resolver.js:185:27 at /home/leanjunio/Documents/work/open-source/etro/node_modules/browser-resolve/index.js:265:24 at /home/leanjunio/Documents/work/open-source/etro/node_modules/resolve/lib/async.js:148:17 at processDirs (/home/leanjunio/Documents/work/open-source/etro/node_modules/resolve/lib/async.js:299:39) at isdir (/home/leanjunio/Documents/work/open-source/etro/node_modules/resolve/lib/async.js:306:32) at /home/leanjunio/Documents/work/open-source/etro/node_modules/resolve/lib/async.js:34:69 at FSReqCallback.oncomplete (node:fs:207:21) 17 04 2023 06:47:56.960:ERROR [karma-server]: Error: Unable to resolve module [canvas] from [/home/leanjunio/Documents/work/open-source/etro/node_modules/resemblejs/resemble.js] { "basedir": "/home/leanjunio/Documents/work/open-source/etro", "extensions": [ ".js", ".json", ".mjs", ".ts", ".tsx" ], "moduleDirectory": [ "node_modules" ], "modules": { "assert": "/home/leanjunio/Documents/work/open-source/etro/node_modules/assert/build/assert.js", "buffer": "/home/leanjunio/Documents/work/open-source/etro/node_modules/buffer/index.js", "child_process": "/home/leanjunio/Documents/work/open-source/etro/node_modules/karma-typescript/dist/bundler/resolve/empty.js", "cluster": "/home/leanjunio/Documents/work/open-source/etro/node_modules/karma-typescript/dist/bundler/resolve/empty.js", "console": "/home/leanjunio/Documents/work/open-source/etro/node_modules/console-browserify/index.js", "constants": "/home/leanjunio/Documents/work/open-source/etro/node_modules/constants-browserify/constants.json", "crypto": "/home/leanjunio/Documents/work/open-source/etro/node_modules/crypto-browserify/index.js", "dgram": "/home/leanjunio/Documents/work/open-source/etro/node_modules/karma-typescript/dist/bundler/resolve/empty.js", "dns": "/home/leanjunio/Documents/work/open-source/etro/node_modules/karma-typescript/dist/bundler/resolve/empty.js", "domain": "/home/leanjunio/Documents/work/open-source/etro/node_modules/domain-browser/source/index.js", "events": "/home/leanjunio/Documents/work/open-source/etro/node_modules/events/events.js", "fs": "/home/leanjunio/Documents/work/open-source/etro/node_modules/karma-typescript/dist/bundler/resolve/empty.js", "http": "/home/leanjunio/Documents/work/open-source/etro/node_modules/stream-http/index.js", "https": "/home/leanjunio/Documents/work/open-source/etro/node_modules/https-browserify/index.js", "module": "/home/leanjunio/Documents/work/open-source/etro/node_modules/karma-typescript/dist/bundler/resolve/empty.js", "net": "/home/leanjunio/Documents/work/open-source/etro/node_modules/karma-typescript/dist/bundler/resolve/empty.js", "os": "/home/leanjunio/Documents/work/open-source/etro/node_modules/os-browserify/browser.js", "path": "/home/leanjunio/Documents/work/open-source/etro/node_modules/path-browserify/index.js", "punycode": "/home/leanjunio/Documents/work/open-source/etro/node_modules/punycode/punycode.js", "querystring": "/home/leanjunio/Documents/work/open-source/etro/node_modules/querystring-es3/index.js", "readline": "/home/leanjunio/Documents/work/open-source/etro/node_modules/karma-typescript/dist/bundler/resolve/empty.js", "repl": "/home/leanjunio/Documents/work/open-source/etro/node_modules/karma-typescript/dist/bundler/resolve/empty.js", "stream": "/home/leanjunio/Documents/work/open-source/etro/node_modules/stream-browserify/index.js", "_stream_duplex": "/home/leanjunio/Documents/work/open-source/etro/node_modules/readable-stream/lib/_stream_duplex.js", "_stream_passthrough": "/home/leanjunio/Documents/work/open-source/etro/node_modules/readable-stream/lib/_stream_passthrough.js", "_stream_readable": "/home/leanjunio/Documents/work/open-source/etro/node_modules/readable-stream/lib/_stream_readable.js", "_stream_transform": "/home/leanjunio/Documents/work/open-source/etro/node_modules/readable-stream/lib/_stream_transform.js", "_stream_writable": "/home/leanjunio/Documents/work/open-source/etro/node_modules/readable-stream/lib/_stream_writable.js", "string_decoder": "/home/leanjunio/Documents/work/open-source/etro/node_modules/string_decoder/lib/string_decoder.js", "sys": "/home/leanjunio/Documents/work/open-source/etro/node_modules/util/util.js", "timers": "/home/leanjunio/Documents/work/open-source/etro/node_modules/timers-browserify/main.js", "tls": "/home/leanjunio/Documents/work/open-source/etro/node_modules/karma-typescript/dist/bundler/resolve/empty.js", "tty": "/home/leanjunio/Documents/work/open-source/etro/node_modules/tty-browserify/index.js", "url": "/home/leanjunio/Documents/work/open-source/etro/node_modules/url/url.js", "util": "/home/leanjunio/Documents/work/open-source/etro/node_modules/util/util.js", "vm": "/home/leanjunio/Documents/work/open-source/etro/node_modules/vm-browserify/index.js", "zlib": "/home/leanjunio/Documents/work/open-source/etro/node_modules/browserify-zlib/lib/index.js", "_process": "/home/leanjunio/Documents/work/open-source/etro/node_modules/process/browser.js" }, "filename": "", "paths": [ "/home/leanjunio/.node_modules", "/home/leanjunio/.node_libraries" ] } Error: Cannot find module 'canvas' from '/home/leanjunio/Documents/work/open-source/etro/node_modules/resemblejs/resemble.js' at /home/leanjunio/Documents/work/open-source/etro/node_modules/karma-typescript/dist/bundler/resolve/resolver.js:185:27 at /home/leanjunio/Documents/work/open-source/etro/node_modules/browser-resolve/index.js:265:24 at /home/leanjunio/Documents/work/open-source/etro/node_modules/resolve/lib/async.js:148:17 at processDirs (/home/leanjunio/Documents/work/open-source/etro/node_modules/resolve/lib/async.js:299:39) at isdir (/home/leanjunio/Documents/work/open-source/etro/node_modules/resolve/lib/async.js:306:32) at /home/leanjunio/Documents/work/open-source/etro/node_modules/resolve/lib/async.js:34:69 at FSReqCallback.oncomplete (node:fs:207:21)
I was getting the following error on
master
so I added the missing dependency