Zach Leatherman :11ty: on Nostr: TypeScript TIL: `compilerOptions.noResolve: true` will also make all of your ...
TypeScript TIL: `compilerOptions.noResolve: true` will also make all of your explicitly listed compilerOptions.types disappear.
So even with `"types": ["node"]` you’ll still get errors that complain about clearly installed types.
> Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig.
Everything is fine.
Published at
2024-07-25 16:34:46Event JSON
{
"id": "50494569d24a8f3963ca86db71c1bef6657cf568a8a19b7f0392a84be341dbb0",
"pubkey": "51b66b5d468ae19d4dee4ffe19ec520a829c415d50ed105666ba730310f6475b",
"created_at": 1721925286,
"kind": 1,
"tags": [
[
"proxy",
"https://fediverse.zachleat.com/users/zachleat/statuses/112848095569188008",
"activitypub"
]
],
"content": "TypeScript TIL: `compilerOptions.noResolve: true` will also make all of your explicitly listed compilerOptions.types disappear.\n\nSo even with `\"types\": [\"node\"]` you’ll still get errors that complain about clearly installed types.\n\n\u003e Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig.\n\nEverything is fine.",
"sig": "48ff0473f8cb48f882a3625daed8507812a58e0d9924ffdb919b10fc652b5b7e39c2493324b1fb64ad586de8e2cbda1354e389282ed2b80499aaebcb483117af"
}