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
The moduleResolution settings "nodenext" and "node16" require import paths with file extensions. Right now the import paths in the generated TypeScript code have no file extensions. This gives me the error "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. [..] ts(2835)".
The text was updated successfully, but these errors were encountered:
SanjoSolutions
changed the title
Request: Support for moduleResolution "NodeNext" and "Node16"
Request: Support for moduleResolution "nodenext" and "node16"
Apr 14, 2024
As a workaround I'm running now sed -Ei 's/(import .* from "\.\/.+)(")/\1.js\2/g' src/protos/*.ts after generating the TypeScript, which adds the ".js" extensions.
The moduleResolution settings "nodenext" and "node16" require import paths with file extensions. Right now the import paths in the generated TypeScript code have no file extensions. This gives me the error "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. [..] ts(2835)".
The text was updated successfully, but these errors were encountered: