Reputation: 51
Having an issue with a local repo on rebuild. I set up the solution on our server, pushed it to Azure DevOps, pulled it to local, did my npm
install, rebuilt and I get a typescript error. My co-worker does not have the same issue, the repo works fine for her. However I also installed the same repo on a blank laptop with the same issue as I am having.
I'm using VS 2022 just like on the server and all the packages and such are the same.
Here's the github repo I installed https://github.com/HBSTech/Kentico13CoreBaseline
Here's the errors from output:
------ Rebuild All started: Project: MVC, Configuration: Debug Any CPU ------ 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(12,72): error TS1144: Build:'{' or ';' expected. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(229,72): error TS1144: Build:'{' or ';' expected. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(400,98): error TS1144: Build:'{' or ';' expected. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(400,105): error TS1005: Build:';' expected. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(400,108): error TS1005: Build:';' expected. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(432,102): error TS1144: Build:'{' or ';' expected. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(432,109): error TS1005: Build:';' expected. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(432,112): error TS1005: Build:';' expected. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(734,51): error TS1144: Build:'{' or ';' expected. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(734,57): error TS1005: Build:';' expected. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(734,60): error TS1005: Build:';' expected. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(892,65): error TS1005: Build:';' expected. 4>tsc : error TS2688: Build:Cannot find type definition file for '.vs'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\estree\index.d.ts(107,38): error TS2304: Build:Cannot find name 'Omit'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\estree\index.d.ts(400,11): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(12,64): error TS2304: Build:Cannot find name 'asserts'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(12,72): error TS1144: Build:'{' or ';' expected. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(12,72): error TS2304: Build:Cannot find name 'value'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(229,64): error TS2304: Build:Cannot find name 'asserts'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(229,72): error TS1144: Build:'{' or ';' expected. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(229,72): error TS2304: Build:Cannot find name 'value'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(400,90): error TS2304: Build:Cannot find name 'asserts'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(400,98): error TS1144: Build:'{' or ';' expected. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(400,98): error TS2304: Build:Cannot find name 'actual'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(400,105): error TS1005: Build:';' expected. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(400,105): error TS2304: Build:Cannot find name 'is'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(400,108): error TS1005: Build:';' expected. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(400,108): error TS2304: Build:Cannot find name 'T'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(432,94): error TS2304: Build:Cannot find name 'asserts'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(432,102): error TS1144: Build:'{' or ';' expected. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(432,102): error TS2304: Build:Cannot find name 'actual'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(432,109): error TS1005: Build:';' expected. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(432,109): error TS2304: Build:Cannot find name 'is'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(432,112): error TS1005: Build:';' expected. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(432,112): error TS2304: Build:Cannot find name 'T'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(734,43): error TS2304: Build:Cannot find name 'asserts'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(734,51): error TS1144: Build:'{' or ';' expected. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(734,51): error TS2304: Build:Cannot find name 'value'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(734,57): error TS1005: Build:';' expected. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(734,57): error TS2304: Build:Cannot find name 'is'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(734,60): error TS1005: Build:';' expected. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(734,60): error TS2531: Build:Object is possibly 'null'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(734,67): error TS2532: Build:Object is possibly 'undefined'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(891,23): error TS2304: Build:Cannot find name 'Omit'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(892,57): error TS2304: Build:Cannot find name 'asserts'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\assert.d.ts(892,65): error TS1005: Build:';' expected. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\buffer.d.ts(166,26): error TS2304: Build:Cannot find name 'globalThis'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\buffer.d.ts(166,26): error TS2503: Build:Cannot find namespace 'globalThis'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\buffer.d.ts(167,26): error TS2304: Build:Cannot find name 'globalThis'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\buffer.d.ts(167,26): error TS2503: Build:Cannot find namespace 'globalThis'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\buffer.d.ts(212,45): error TS2304: Build:Cannot find name 'SharedArrayBuffer'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\buffer.d.ts(244,66): error TS2304: Build:Cannot find name 'SharedArrayBuffer'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\buffer.d.ts(336,80): error TS2304: Build:Cannot find name 'SharedArrayBuffer'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\buffer.d.ts(869,36): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\buffer.d.ts(890,36): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\buffer.d.ts(911,37): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\buffer.d.ts(916,37): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\buffer.d.ts(937,37): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\buffer.d.ts(942,37): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\buffer.d.ts(1057,47): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\buffer.d.ts(1062,47): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\buffer.d.ts(1079,47): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\buffer.d.ts(1084,47): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\buffer.d.ts(1093,46): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\buffer.d.ts(1102,46): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\child_process.d.ts(71,62): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\console.d.ts(411,14): error TS2304: Build:Cannot find name 'globalThis'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\crypto.d.ts(510,26): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\crypto.d.ts(3229,53): error TS2304: Build:Cannot find name 'SharedArrayBuffer'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\crypto.d.ts(3229,87): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\crypto.d.ts(3273,116): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\crypto.d.ts(3275,124): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\crypto.d.ts(3304,84): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\crypto.d.ts(3306,92): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\fs.d.ts(2235,41): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\fs.d.ts(3790,52): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\fs.d.ts(3791,18): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\fs.d.ts(3792,18): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\fs.d.ts(3793,18): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\fs.d.ts(3794,22): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\globals.d.ts(99,51): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\globals.d.ts(100,52): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\globals.global.d.ts(1,28): error TS2304: Build:Cannot find name 'globalThis'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\index.d.ts(72,21): error TS2726: Build:Cannot find lib definition for 'es2020'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\index.d.ts(75,21): error TS2727: Build:Cannot find lib definition for 'esnext.bigint'. Did you mean 'esnext.intl'? 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\perf_hooks.d.ts(493,30): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\perf_hooks.d.ts(537,24): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\perf_hooks.d.ts(542,24): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\process.d.ts(119,27): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\stream.d.ts(842,106): error TS2304: Build:Cannot find name 'AsyncGeneratorFunction'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\url.d.ts(872,13): error TS2403: Build:Subsequent variable declarations must have the same type. Variable 'URL' must be of type '{ new (url: string, base?: string | URL | undefined): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }', but here has type '{} | typeof URL'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\url.d.ts(874,20): error TS2304: Build:Cannot find name 'globalThis'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\url.d.ts(882,13): error TS2403: Build:Subsequent variable declarations must have the same type. Variable 'URLSearchParams' must be of type '{ new (init?: string | Record<string, string> | URLSearchParams | string[][] | undefined): URLSearchParams; prototype: URLSearchParams; }', but here has type '{} | typeof URLSearchParams'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\url.d.ts(884,20): error TS2304: Build:Cannot find name 'globalThis'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\util.d.ts(1216,77): error TS2304: Build:Cannot find name 'BigInt'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\util.d.ts(1479,62): error TS2304: Build:Cannot find name 'SharedArrayBuffer'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\node\worker_threads.d.ts(610,62): error TS2304: Build:Cannot find name 'bigint'. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\react\index.d.ts(232,10): error TS2456: Build:Type alias 'ReactFragment' circularly references itself. 4>C:\VS_2022_REPOS\REPO\EmployeePortal\MVCBaseline\MVC\MVC\node_modules@types\react\index.d.ts(233,10): error TS2456: Build:Type alias 'ReactNode' circularly references itself. 4>Done building project "MVC.csproj" -- FAILED.
========== Rebuild All: 3 succeeded, 1 failed, 0 skipped ==========
What I've tried: I made sure TypeScript version and the @types/node version were compatible per this I am getting an ERROR when compiling Angular 6 project
I've tried upgrading, downgrading and all sorts of other combos for TS & node. Also made sure VS 2022 is up to date as well as windows. I've copied the exact, working repo from the server directly onto my local, rebuilt and got the same error. I'm sure there is some more stuff I cannot currently think of.
Lastly should be noted this is my first bout with TS and these types of errors so forgive me if there's any dumb questions or assumptions on my part. Thank you.
Upvotes: 3
Views: 5500
Reputation: 1
You could try this:
package-lock.json
file.node_modules
folder.Then do
npm i --force
Upvotes: 0
Reputation: 51
After a lot of headaches, I found this warning (probably should've started there), but now everything seems to be happy after installing the said package. Strangely on the original install, this was not required.
Upvotes: 2