Title: Module resolution: noUncheckedSideEffectImports doesn't resolve CSS-only node_modules with globals.d.ts · Issue #62674 · microsoft/TypeScript · GitHub
Open Graph Title: Module resolution: noUncheckedSideEffectImports doesn't resolve CSS-only node_modules with globals.d.ts · Issue #62674 · microsoft/TypeScript
X Title: Module resolution: noUncheckedSideEffectImports doesn't resolve CSS-only node_modules with globals.d.ts · Issue #62674 · microsoft/TypeScript
Description: Demo Repo https://github.com/jdufresne/typescript-nouncheckedsideeffectimports Which of the following problems are you reporting? The module specifier resolves to the right file, but something about the types are wrong Demonstrate the de...
Open Graph Description: Demo Repo https://github.com/jdufresne/typescript-nouncheckedsideeffectimports Which of the following problems are you reporting? The module specifier resolves to the right file, but something abou...
X Description: Demo Repo https://github.com/jdufresne/typescript-nouncheckedsideeffectimports Which of the following problems are you reporting? The module specifier resolves to the right file, but something abou...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/62674
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Module resolution: noUncheckedSideEffectImports doesn't resolve CSS-only node_modules with globals.d.ts","articleBody":"### Demo Repo\n\nhttps://github.com/jdufresne/typescript-nouncheckedsideeffectimports\n\n### Which of the following problems are you reporting?\n\nThe module specifier resolves to the right file, but something about the types are wrong\n\n### Demonstrate the defect described above with a code sample.\n\n`globals.d.ts`:\n\n```ts\ndeclare module \"*.css\";\n```\n\n`index.ts`:\n\n```ts\nimport \"@fontsource/roboto\";\n```\n\n### Run `tsc --showConfig` and paste its output here\n\n```\n$ npx tsc --showConfig\n{\n \"compilerOptions\": {\n \"skipLibCheck\": true,\n \"noUncheckedSideEffectImports\": true\n },\n \"files\": [\n \"./globals.d.ts\",\n \"./index.ts\"\n ]\n}\n```\n\n### Run `tsc --traceResolution` and paste its output here\n\n```\n$ npx tsc --traceResolution\n======== Resolving module './index.css' from '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/index.ts'. ========\nModule resolution kind is not specified, using 'Node10'.\nLoading module as file / folder, candidate module location '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/index.css', target file types: TypeScript, Declaration.\nFile name '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/index.css' has a '.css' extension - stripping it.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/index.d.css.ts' does not exist.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/index.css.ts' does not exist.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/index.css.tsx' does not exist.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/index.css.d.ts' does not exist.\nDirectory '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/index.css' does not exist, skipping all lookups in it.\nLoading module as file / folder, candidate module location '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/index.css', target file types: JavaScript.\nFile name '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/index.css' has a '.css' extension - stripping it.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/index.css.js' does not exist.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/index.css.jsx' does not exist.\nDirectory '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/index.css' does not exist, skipping all lookups in it.\n======== Module name './index.css' was not resolved. ========\n======== Resolving module '@fontsource/roboto' from '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/index.ts'. ========\nModule resolution kind is not specified, using 'Node10'.\nLoading module '@fontsource/roboto' from 'node_modules' folder, target file types: TypeScript, Declaration.\nSearching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.\nFound 'package.json' at '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/package.json'.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto.ts' does not exist.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto.tsx' does not exist.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto.d.ts' does not exist.\n'package.json' does not have a 'typesVersions' field.\n'package.json' does not have a 'typings' field.\n'package.json' does not have a 'types' field.\n'package.json' has 'main' field 'index.css' that references '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.css'.\nFile name '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.css' has a '.css' extension - stripping it.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.d.css.ts' does not exist.\nLoading module as file / folder, candidate module location '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.css', target file types: TypeScript, Declaration.\nFile name '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.css' has a '.css' extension - stripping it.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.d.css.ts' does not exist.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.css.ts' does not exist.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.css.tsx' does not exist.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.css.d.ts' does not exist.\nDirectory '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.css' does not exist, skipping all lookups in it.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.ts' does not exist.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.tsx' does not exist.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.d.ts' does not exist.\nDirectory '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@types' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'fontsource__roboto'\nDirectory '/home/jon/devel/jdufresne/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'fontsource__roboto'\nDirectory '/home/jon/devel/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'fontsource__roboto'\nDirectory '/home/jon/node_modules/@types' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'fontsource__roboto'\nDirectory '/home/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'fontsource__roboto'\nDirectory '/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'fontsource__roboto'\nLoading module '@fontsource/roboto' from 'node_modules' folder, target file types: JavaScript.\nSearching all ancestor node_modules directories for fallback extensions: JavaScript.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/package.json' exists according to earlier cached lookups.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto.js' does not exist.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto.jsx' does not exist.\n'package.json' has 'main' field 'index.css' that references '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.css'.\nFile name '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.css' has a '.css' extension - stripping it.\nLoading module as file / folder, candidate module location '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.css', target file types: JavaScript.\nFile name '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.css' has a '.css' extension - stripping it.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.css.js' does not exist.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.css.jsx' does not exist.\nDirectory '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.css' does not exist, skipping all lookups in it.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.js' does not exist.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.jsx' does not exist.\nDirectory '/home/jon/devel/jdufresne/node_modules' does not exist, skipping all lookups in it.\nDirectory '/home/jon/devel/node_modules' does not exist, skipping all lookups in it.\nDirectory '/home/node_modules' does not exist, skipping all lookups in it.\nDirectory '/node_modules' does not exist, skipping all lookups in it.\nResolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update.\nLoading module '@fontsource/roboto' from 'node_modules' folder, target file types: TypeScript, Declaration.\nSearching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/package.json' exists according to earlier cached lookups.\nEntering conditional exports.\nSaw non-matching condition 'sass'.\nMatched 'exports' condition 'default'.\nUsing 'exports' subpath '.' with target './index.css'.\nFile name '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.css' has a '.css' extension - stripping it.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@fontsource/roboto/index.d.css.ts' does not exist.\nFailed to resolve under condition 'default'.\nExiting conditional exports.\nDirectory '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@types' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'fontsource__roboto'\nDirectory '/home/jon/devel/jdufresne/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'fontsource__roboto'\nDirectory '/home/jon/devel/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'fontsource__roboto'\nDirectory '/home/jon/node_modules/@types' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'fontsource__roboto'\nDirectory '/home/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'fontsource__roboto'\nDirectory '/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'fontsource__roboto'\n======== Module name '@fontsource/roboto' was not resolved. ========\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/typescript/lib/package.json' does not exist.\nFound 'package.json' at '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/typescript/package.json'.\n======== Resolving module '@typescript/lib-es5' from '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========\nExplicitly specified module resolution kind: 'Node10'.\nLoading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.\nSearching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.\nDirectory '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@types' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-es5'\nDirectory '/home/jon/devel/jdufresne/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-es5'\nDirectory '/home/jon/devel/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-es5'\nDirectory '/home/jon/node_modules/@types' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-es5'\nDirectory '/home/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-es5'\nDirectory '/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-es5'\nLoading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.\nSearching all ancestor node_modules directories for fallback extensions: JavaScript.\nDirectory '/home/jon/devel/jdufresne/node_modules' does not exist, skipping all lookups in it.\nDirectory '/home/jon/devel/node_modules' does not exist, skipping all lookups in it.\nDirectory '/home/node_modules' does not exist, skipping all lookups in it.\nDirectory '/node_modules' does not exist, skipping all lookups in it.\n======== Module name '@typescript/lib-es5' was not resolved. ========\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/typescript/lib/package.json' does not exist according to earlier cached lookups.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/typescript/package.json' exists according to earlier cached lookups.\n======== Resolving module '@typescript/lib-decorators' from '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========\nExplicitly specified module resolution kind: 'Node10'.\nLoading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.\nSearching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.\nDirectory '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@types' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-decorators'\nDirectory '/home/jon/devel/jdufresne/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-decorators'\nDirectory '/home/jon/devel/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-decorators'\nDirectory '/home/jon/node_modules/@types' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-decorators'\nDirectory '/home/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-decorators'\nDirectory '/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-decorators'\nLoading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.\nSearching all ancestor node_modules directories for fallback extensions: JavaScript.\nDirectory '/home/jon/devel/jdufresne/node_modules' does not exist, skipping all lookups in it.\nDirectory '/home/jon/devel/node_modules' does not exist, skipping all lookups in it.\nDirectory '/home/node_modules' does not exist, skipping all lookups in it.\nDirectory '/node_modules' does not exist, skipping all lookups in it.\n======== Module name '@typescript/lib-decorators' was not resolved. ========\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/typescript/lib/package.json' does not exist according to earlier cached lookups.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/typescript/package.json' exists according to earlier cached lookups.\n======== Resolving module '@typescript/lib-decorators/legacy' from '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========\nExplicitly specified module resolution kind: 'Node10'.\nLoading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.\nSearching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.\nDirectory '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@types' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-decorators/legacy'\nDirectory '/home/jon/devel/jdufresne/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-decorators/legacy'\nDirectory '/home/jon/devel/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-decorators/legacy'\nDirectory '/home/jon/node_modules/@types' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-decorators/legacy'\nDirectory '/home/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-decorators/legacy'\nDirectory '/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-decorators/legacy'\nLoading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.\nSearching all ancestor node_modules directories for fallback extensions: JavaScript.\nDirectory '/home/jon/devel/jdufresne/node_modules' does not exist, skipping all lookups in it.\nDirectory '/home/jon/devel/node_modules' does not exist, skipping all lookups in it.\nDirectory '/home/node_modules' does not exist, skipping all lookups in it.\nDirectory '/node_modules' does not exist, skipping all lookups in it.\n======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/typescript/lib/package.json' does not exist according to earlier cached lookups.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/typescript/package.json' exists according to earlier cached lookups.\n======== Resolving module '@typescript/lib-dom' from '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========\nExplicitly specified module resolution kind: 'Node10'.\nLoading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.\nSearching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.\nDirectory '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@types' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-dom'\nDirectory '/home/jon/devel/jdufresne/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-dom'\nDirectory '/home/jon/devel/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-dom'\nDirectory '/home/jon/node_modules/@types' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-dom'\nDirectory '/home/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-dom'\nDirectory '/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-dom'\nLoading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.\nSearching all ancestor node_modules directories for fallback extensions: JavaScript.\nDirectory '/home/jon/devel/jdufresne/node_modules' does not exist, skipping all lookups in it.\nDirectory '/home/jon/devel/node_modules' does not exist, skipping all lookups in it.\nDirectory '/home/node_modules' does not exist, skipping all lookups in it.\nDirectory '/node_modules' does not exist, skipping all lookups in it.\n======== Module name '@typescript/lib-dom' was not resolved. ========\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/typescript/lib/package.json' does not exist according to earlier cached lookups.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/typescript/package.json' exists according to earlier cached lookups.\n======== Resolving module '@typescript/lib-webworker/importscripts' from '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========\nExplicitly specified module resolution kind: 'Node10'.\nLoading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.\nSearching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.\nDirectory '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@types' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-webworker/importscripts'\nDirectory '/home/jon/devel/jdufresne/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-webworker/importscripts'\nDirectory '/home/jon/devel/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-webworker/importscripts'\nDirectory '/home/jon/node_modules/@types' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-webworker/importscripts'\nDirectory '/home/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-webworker/importscripts'\nDirectory '/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-webworker/importscripts'\nLoading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.\nSearching all ancestor node_modules directories for fallback extensions: JavaScript.\nDirectory '/home/jon/devel/jdufresne/node_modules' does not exist, skipping all lookups in it.\nDirectory '/home/jon/devel/node_modules' does not exist, skipping all lookups in it.\nDirectory '/home/node_modules' does not exist, skipping all lookups in it.\nDirectory '/node_modules' does not exist, skipping all lookups in it.\n======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/typescript/lib/package.json' does not exist according to earlier cached lookups.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/typescript/package.json' exists according to earlier cached lookups.\n======== Resolving module '@typescript/lib-scripthost' from '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========\nExplicitly specified module resolution kind: 'Node10'.\nLoading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.\nSearching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.\nDirectory '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/@types' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-scripthost'\nDirectory '/home/jon/devel/jdufresne/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-scripthost'\nDirectory '/home/jon/devel/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-scripthost'\nDirectory '/home/jon/node_modules/@types' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-scripthost'\nDirectory '/home/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-scripthost'\nDirectory '/node_modules' does not exist, skipping all lookups in it.\nScoped package detected, looking in 'typescript__lib-scripthost'\nLoading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.\nSearching all ancestor node_modules directories for fallback extensions: JavaScript.\nDirectory '/home/jon/devel/jdufresne/node_modules' does not exist, skipping all lookups in it.\nDirectory '/home/jon/devel/node_modules' does not exist, skipping all lookups in it.\nDirectory '/home/node_modules' does not exist, skipping all lookups in it.\nDirectory '/node_modules' does not exist, skipping all lookups in it.\n======== Module name '@typescript/lib-scripthost' was not resolved. ========\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/typescript/lib/package.json' does not exist according to earlier cached lookups.\nFile '/home/jon/devel/jdufresne/typescript-nouncheckedsideeffectimports/node_modules/typescript/package.json' exists according to earlier cached lookups.\nindex.ts:2:8 - error TS2307: Cannot find module '@fontsource/roboto' or its corresponding type declarations.\n\n2 import \"@fontsource/roboto\";\n ~~~~~~~~~~~~~~~~~~~~\n\n\nFound 1 error in index.ts:2\n```\n\n### Paste the `package.json` of the *importing* module, if it exists\n\n```json\n{\n \"name\": \"typescript-nouncheckedsideeffectimports\",\n \"dependencies\": {\n \"@fontsource/roboto\": \"^5.2.8\",\n \"typescript\": \"^5.9.3\"\n }\n}\n```\n\n### Paste the `package.json` of the *target* module, if it exists\n\n```json\n{\n \"name\": \"@fontsource/roboto\",\n \"version\": \"5.2.8\",\n \"description\": \"Self-host the Roboto font in a neatly bundled NPM package.\",\n \"main\": \"index.css\",\n \"publishConfig\": {\"access\": \"public\"},\n \"keywords\": [\n \"fontsource\",\n \"font\",\n \"font family\",\n \"google fonts\",\n \"roboto\",\n \"Roboto\",\n \"css\",\n \"sass\",\n \"front-end\",\n \"web\",\n \"typeface\",\n \"variable\"\n ],\n \"exports\": {\n \".\": {\"sass\": \"./index.css\", \"default\": \"./index.css\"},\n \"./LICENSE\": \"./LICENSE\",\n \"./*\": {\"sass\": \"./*.css\", \"default\": \"./*.css\"},\n \"./*.css\": {\"sass\": \"./*.css\", \"default\": \"./*.css\"},\n \"./files/*\": {\"sass\": \"./files/*\", \"default\": \"./files/*\"},\n \"./files/*.woff\": {\"sass\": \"./files/*.woff\", \"default\": \"./files/*.woff\"},\n \"./files/*.woff2\": {\n \"sass\": \"./files/*.woff2\",\n \"default\": \"./files/*.woff2\"\n },\n \"./package.json\": \"./package.json\",\n \"./metadata.json\": \"./metadata.json\",\n \"./unicode.json\": \"./unicode.json\",\n \"./scss\": {\"sass\": \"./scss/metadata.scss\"}\n },\n \"author\": \"Google Inc.\",\n \"license\": \"OFL-1.1\",\n \"homepage\": \"https://fontsource.org/fonts/roboto\",\n \"funding\": \"https://github.com/sponsors/ayuhito\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/fontsource/font-files.git\",\n \"directory\": \"fonts/google/roboto\"\n },\n \"publishHash\": \"796e33ab906c9be2\"\n}\n```\n\n### Any other comments can go here\n\nMy goal is to enable the recommended option: `noUncheckedSideEffectImports`. The docs state to add \"an ambient module declaration with a wildcard specifier.\" I've done this; the example repository demonstrate this by importing a local \"index.css\" file. However, it isn't being applied to the CSS-only module in node_modules so it creates the error pasted above.","author":{"url":"https://github.com/jdufresne","@type":"Person","name":"jdufresne"},"datePublished":"2025-10-25T20:33:36Z","url":"https://github.com/microsoft/TypeScript/issues/62674"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a52c0236-e22d-e7a9-93d5-f56661bb4917 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C422:3F8AB1:C7814A:10136F2:6B00ED13 |
| html-safe-nonce | abd78ac0c2141ba90bebd74cbfca402e9d7a8c2b20de480f7bb7821c2c1dce4b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDIyOjNGOEFCMTpDNzgxNEE6MTAxMzZGMjo2QjAwRUQxMyIsInZpc2l0b3JfaWQiOiI2NjY3MDkwNjA3MzkzMDA4OTE1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 04c3443e48772f738f0ba281c381e7ea81507e5500e1c76ab7bbdbbd1934c920 |
| hovercard-subject-tag | issue:3552955750 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/62674/issue_layout |
| twitter:image | https://opengraph.githubassets.com/89770932ce76ce83bd7335588e570f0b2fe08a0d6ed1770df6d38b084d99bc3b/microsoft/TypeScript/issues/62674 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/89770932ce76ce83bd7335588e570f0b2fe08a0d6ed1770df6d38b084d99bc3b/microsoft/TypeScript/issues/62674 |
| og:image:alt | Demo Repo https://github.com/jdufresne/typescript-nouncheckedsideeffectimports Which of the following problems are you reporting? The module specifier resolves to the right file, but something abou... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jdufresne |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width