简体   繁体   中英

getting TS1005 typescript error after runing npm start in nestjs project

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

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
...
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM