You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unexpected early exit (code 13) when trying to import {} from a dynamic import() #1882
// server.tsimport*aspathfrom"path";import*asurlfrom"url";const__filename=url.fileURLToPath(import.meta.url);const__dirname=path.dirname(__filename);exportconstBASE_URL=newURL("http://localhost:8080");constexports=awaitimport(url.pathToFileURL(path.join(__dirname,"index.ts")).toString());console.log(exports);// <-- we never get here
// index.ts// The error appears to be contingent on this import:import{BASE_URL}from"./server";exportasyncfunctionget(request,response){console.log(BASE_URL);}
Activity
brianjenkins94 commentedon Sep 11, 2022
csspotcode helped me on Discord to determine that the same results happen without
ts-nodeat all.