question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to compile in a typescript project

See original GitHub issue

What are you doing?

I’m compiling my typescript project.

tsc

What do you expect to happen?

Compile successfully

What is actually happening?

Failing with failed type declaration missings.

node_modules/sequelize/types/lib/promise.d.ts(2,27): error TS7016: Could not find a declaration file for module 'bluebird'. '/opt/api/node_modules/bluebird/js/release/bluebird.js' implicitly has an 'any' type.
  Try `npm install @types/bluebird` if it exists or add a new declaration (.d.ts) file containing `declare module 'bluebird';`
node_modules/sequelize/types/lib/utils/validator-extras.d.ts(2,22): error TS7016: Could not find a declaration file for module 'validator'. '/opt/api/node_modules/validator/index.js' implicitly has an 'any' type.
  Try `npm install @types/validator` if it exists or add a new declaration (.d.ts) file containing `declare module 'validator';`

Dialect: any Sequelize version: 5.1.0 Tested with latest release: Yes

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
SimonSchickcommented, Mar 17, 2019

We haven’t defined these packages as dependencies to avoid bloating non-ts installations, please install @types/bluebird and @types/validator separately.

1reaction
WikiRikcommented, Dec 2, 2021

Ah yes, having the types in the devDependencies when they might also be used in production might not be the best thing. I will discuss this with the team. Thanks for your quick response

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: TSError: Unable to compile TypeScript - Stack Overflow
My Project is built on Angular4 with typescript, e2e testing with protractor & karma. Travis-ci has this error: [03:34:54] E/launcher - Error: ...
Read more >
TSError: Unable to compile TypeScript after version `10.1.0 ...
After upgrading from version 10.0.3 to 10.1.0 cypress shows this error. The typescript file seems to be ignored, the project works fine with...
Read more >
I got Unable to compile TypeScript error - CircleCI Discuss
One thing you can do to ensure this is to make sure your executor has Java runtime set up. Based on your config,...
Read more >
TypeScript Compiling with Visual Studio Code
A tsconfig.json file defines the TypeScript project settings, such as the compiler options and the files that should be included. To do this,...
Read more >
Troubleshooting | ts-node - TypeStrong · GitHub
ts-node also respects your locally-installed typescript version, ... Solution: configure your project to compile and execute as native ESM.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found