New Jun 4, 2026

React build from source throwing error.Could not find a declaration file for module '@babel/code-frame'

Libraries, Frameworks, etc. All from Newest questions tagged reactjs - Stack Overflow View React build from source throwing error.Could not find a declaration file for module '@babel/code-frame' on stackoverflow.com

Running:

mkdir -p ./compiler/packages/babel-plugin-react-compiler/dist && echo "module.exports = require('../src/index.ts');" > ./compiler/packages/babel-plugin-react-compiler/dist/index.js BUILDING eslint-plugin-react-hooks.development.js 

(node_dev) @rollup/plugin-typescript TS7016: Could not find a declaration file for module '@babel/code-frame'. '/Users/jithinaji/Developer/react/node_modules/@babel/code-frame/lib/index.js' implicitly has an 'any' type. Try npm i --save-dev @types/babel__code-frame if it exists or add a new declaration (.d.ts) file containing declare module '@babel/code-frame';

I am trying to build react from source and I am getting this error.
It's been a while since I am stuck on this.
I had reactjs freshly installed and made no changes to the source file.

Please feel free to ask for more details.

Scroll to top