xyz6675
xyz6675

Reputation: 365

create-react-app build failed on Cloudflare - Cannot find module

I am trying to deploy a create-react-app project on Cloudflare and am getting this error:

14:13:41.544    Creating an optimized production build...
14:13:42.821    Failed to compile.
14:13:42.822    
14:13:42.822    Module not found: Error: Can't resolve 'animate.css' in '/opt/buildhome/repo/src'
14:13:42.822    
14:13:42.822    
14:13:42.849    Failed: build command exited with code: 1
14:13:43.787    Failed: an internal error occurred

My package.json has animate.css but I am not sure what I am doing wrong. npm run build works perfectly when I am doing it locally.

package.json

"dependencies": {
    ...
    "animate.css": "^4.1.1",
    "aos": "^3.0.0-beta.6",
    "bootstrap": "^5.2.3",
    "react": "^18.2.0",
    ...
    },

Upvotes: 3

Views: 211

Answers (0)

Related Questions