You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
error TS2688: Cannot find type definition file for 'babel__core'. #51
> babel-typescript-sample@0.7.1 build:types /Users/heweipeng/byted/TypeScript-Babel-Starter
> tsc --emitDeclarationOnly
error TS2688: Cannot find type definition file for 'babel__core'.
error TS2688: Cannot find type definition file for 'babel__template'.
Found 2 errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! babel-typescript-sample@0.7.1 build:types: `tsc --emitDeclarationOnly`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the babel-typescript-sample@0.7.1 build:types script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/heweipeng/.npm/_logs/2020-01-16T07_29_50_627Z-debug.log
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I fixed by installing the types that it said I was missing: npm i --save-dev @types/babel__core
Reacted by Piotr Błażejewicz (Peter Blazejewicz), Damien Golding, Matthew Davis, Daniel Lewis, Doan Nguyen Hoang, Maycon Renan Ribeiro, Aldrin Papa, Axel Avaux, Ronny Hanssen, Přemek Vysoký and 49 more
Reacted by jmfantin2, Antony Fagundez, Felipe Gontijo Alpino, Rod Joseph, pj_max, Yuri Castro, Gabriel, Lautaro Zarandón, Lucas Kenji and Stanisław Jarocki
I had such an issue when I had all my dependencies installed via yarn and after that, I occasionally added a new one with npm. So I fixed it by just removing package-lock.json and reinstalling all the deps by yarn command. Possibly this could be helpful for somebody
Activity
peterblazejewicz commentedon Feb 19, 2020
weaponhe (@weaponhe) Is this one still a problem? It looks like problem with just types not being correctly resolved (for some reason)
muescha commentedon May 20, 2020
someone else an idea? i have the same problem
pedapudibhargav commentedon May 23, 2020
I have the same issue. Any fix for this?
leeweisberger commentedon Jul 14, 2020
I fixed by installing the types that it said I was missing:
npm i --save-dev @types/babel__corebisatech369 commentedon Mar 16, 2021
Thank you so much!
vitaliyirtlach commentedon Mar 24, 2021
thanks, it helped me too ;)!
bnabaei commentedon Apr 14, 2021
Worked for me too! Thanks!
jmfantin2 commentedon Apr 20, 2021
me 2, for
babel__generatorthothanks a lot!
wingon-niu commentedon Nov 28, 2021
Thank you so much!
SergeyMell commentedon Jan 26, 2022
I had such an issue when I had all my dependencies installed via
yarnand after that, I occasionally added a new one withnpm. So I fixed it by just removingpackage-lock.jsonand reinstalling all the deps byyarncommand. Possibly this could be helpful for somebodyevgeniyp commentedon Feb 21, 2022
In my case, it's caused by the
node_modulesdirectory which was accidentally created at the same level as my backend project folder.