got a weird problem, `sst start` works, but when i...
# help
m
got a weird problem,
sst start
works, but when i
sst deploy
my app I get
Copy code
"Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'tcl' imported from /var/task/src/http.js",
        "Did you mean to import tcl/index.js?",
        "    at new NodeError (internal/errors.js:322:7)",
        "    at packageResolve (internal/modules/esm/resolve.js:732:9)",
        "    at moduleResolve (internal/modules/esm/resolve.js:773:18)",
        "    at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:887:11)",
        "    at Loader.resolve (internal/modules/esm/loader.js:89:40)",
        "    at Loader.getModuleJob (internal/modules/esm/loader.js:242:28)",
        "    at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:76:40)",
        "    at link (internal/modules/esm/module_job.js:75:36)",
        "    at process.runNextTicks [as _tickCallback] (internal/process/task_queues.js:60:5)",
        "    at /var/runtime/deasync.js:23:15"
tcl lives in a layer it's very strange because it works fine with
sst start
t
is this esm mode?
I think ESM technically doesn't consider index.js to be special anymore
typescript and esbuild still do so there's some discrepancy
m
esm yea
i think maybe something is wrong with my layer but i have no idea how to check
t
can you try importing from
tcl/index.js
?
m
i'm trying commonjs mode now
yeah got a very different error when not using ESM
Copy code
2022-04-18T23:42:43.119000+00:00 2022/04/18/[$LATEST]7c775119984f46b09e94b16f087db0f4 2022-04-18T23:42:43.119Z	undefined	ERROR	Uncaught Exception 	{"errorType":"Error","errorMessage":"/lib64/libm.so.6: version `GLIBC_2.29' not found (required by /opt/lib/libtcl8.6.so)","code":"ERR_DLOPEN_FAILED","stack":["Error: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by /opt/lib/libtcl8.6.so)","    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1144:18)","    at Module.load (internal/modules/cjs/loader.js:950:32)","    at Function.Module._load (internal/modules/cjs/loader.js:790:12)","    at Module.require (internal/modules/cjs/loader.js:974:19)","    at require (internal/modules/cjs/helpers.js:101:18)","    at bindings (/opt/nodejs/node_modules/bindings/bindings.js:112:48)","    at Object.<anonymous> (/opt/nodejs/node_modules/tcl/lib/tcl.js:4:36)","    at Module._compile (internal/modules/cjs/loader.js:1085:14)","    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)","    at Module.load (internal/modules/cjs/loader.js:950:32)"]}
why the fuck is it a different error?
t
maybe it's getting further but still failing?
m
yeah
its getting further and tells me what the actual error is instead of just saying it can't import something
which is helpful but makes me smh @ esm