Sione
03/11/2021, 8:48 PMbaseUrl
to resolve module file path relative to baseUrl . Typescript does recognized the path but it's failing on build. I wonder if this is esbuild limitation or something else. From the looks of it in .build file, the path is not being resolved.
Running type checker
Deploying stacks
Error: Cannot find module 'util/domain'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/Users/sionelt/projects/enterprise/lib/integrations-app.ts:10:46)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
Frank
Sione
03/11/2021, 10:04 PMutil
. The dir is in at the root. I happen to read through sst scripts source code trying to understand how esbuild is being used and I noticed that it has a dir name called util
as well. I wonder would that be why, it's trying to find my file in that dir?! Anyways its working now when i rename it from util
Jay
Jay
Sione
03/12/2021, 9:43 PMutil
at the root that uses typescript baseUrl config to resolve path.Sione
03/12/2021, 9:44 PMutil
then it will work and resolve the import on build.Jay
Jay
util
is a built-in?Sione
03/13/2021, 11:50 PM