0

I ran a nodejs project that use nestjs. after installing all packages with npm install and runing npm run start command I got this error and I searched many times but I didn't find any solution. here is error

E:\project\node_modules\@types\mongodb\index.d.ts(935,21)
      TS1005: ';' expected.

I tried with 2 typescript versions 2.7.1 and 3.6 but it didn't work.

here is some information about my system and that project:

OS: win10 x64 however I tried it with Ubuntu18

typescript version: I tried with 2.7 and 3.6 versions and I got the same error

monogdb version:3.5.6.mongodb package

m.eslampnah
  • 169
  • 1
  • 4
  • 10

1 Answers1

0

It's hard to tell why this happens exactly with the information you provided, however as a workaround you can try skipping the check of all declarations files by setting the following option in your tsconfig:

{
...
skipLibCheck: true
...
}
eol
  • 23,236
  • 5
  • 46
  • 64
  • unfortunately it didn't work. what information is needed I'll add it. – m.eslampnah Apr 29 '20 at 00:54
  • So you're on a Ubuntu VM on windows? Did you remove the node_modules folder and execute npm --install? Also this might help you: https://stackoverflow.com/a/46399668/3761628 – eol Apr 29 '20 at 05:41