Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 11661

Github Actions create-react-app build step fails only in pipeline but not on local machine

$
0
0

I am running a GitHub Actions build step to install npm dependencies and build the react app. My build runs fine on my windows machine but fails in Githubs Ubuntu virtual machine. The error I get is:

TS7016: Could not find a declaration file for module 'react-dom'. '/home/runner/work/React-Portfolio/React-Portfolio/client/node_modules/react-dom/index.js' implicitly has an 'any' type.

"Try npm i --save-dev @types/react-dom if it exists or add a new declaration (.d.ts) file containing `declare module 'react-dom'"

I have @types/react, and @types/react-dom listed in the package.json, however the issue persists.

Adding a type declaration seems like a hack any better ways to do this?


Viewing all articles
Browse latest Browse all 11661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>