Question

Deployment failing regarding not finding a declaration file that works perfectly fine on local host

github repository: https://github.com/alisaeedcs/ali-portfolio

this is the error:

./components/experience.tsx:8:8
Type error: Could not find a declaration file for module 'react-vertical-timeline-component'. '/workspace/node_modules/react-vertical-timeline-component/dist-modules/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/react-vertical-timeline-component` if it exists or add a new declaration (.d.ts) file containing `declare module 'react-vertical-timeline-component';`
6 |   VerticalTimeline,
7 |   VerticalTimelineElement,
8 | } from "react-vertical-timeline-component";
  |        ^
9 | import "react-vertical-timeline-component/style.min.css";
10 | import { experiencesData } from "@/lib/data";
11 | import { useSectionInView } from "@/lib/hooks";

Had a previous app platform that worked perfeclty, delete and remade and now its bugging out. Help appreciated.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Hi there!

As far as I can tell the package was missing from your package lock file, I’ve submitted a PR for this:

https://github.com/alisaeedcs/ali-portfolio/pull/1

Also when you create the new app, you don’t have to specify a custom build command as you already have that defined in your package json file.

After merging that PR if you are still seeing the problem do this:

  • Go to your App
  • Click on Settings
  • Click on the protfolio component
  • Edit the build command and remove the npm run build line if it is there:

I’ve just tried deploying your portfolio and it worked as described above:

Let me know how it goes!

- Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.