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.

Don't show errors for repos lacking type definitions

See original GitHub issue

I’m trying to use the kinematics npm package, but it seems that none of my attempts are working so far. What is the correct path to the modules folder within an Angular project ?

My script is located at top level scripts folders script/ImportTest.ts and here all my import attempts so far ( none of them seems to work ):

import Kinematics from 'kinematics';
import Kinematics from './kinematics';
import Kinematics from '../kinematics';
import Kinematics from '../../kinematics';
import Kinematics from '../node_modules/kinematics';
import Kinematics from '../node_modules/kinematics/src';
import Kinematics from '../node_modules/kinematics/src/index.js';
import Kinematics from '../node_modules/kinematics/src/kinematics.js';
import { Kinematics } from 'kinematics';
import { Kinematics } from './kinematics';
import { Kinematics } from '../kinematics';
import { Kinematics } from '../../kinematics';
import { Kinematics } from '../node_modules/kinematics';
import { Kinematics } from '../node_modules/kinematics/src';
import { Kinematics } from '../node_modules/kinematics/src/index.js';
import { Kinematics } from '../node_modules/kinematics/src/kinematics.js';
import * as Kinematics from 'kinematics';
import * as Kinematics from './kinematics';
import * as Kinematics from '../kinematics';
import * as Kinematics from '../../kinematics';
import * as Kinematics from '../node_modules/kinematics';
import * as Kinematics from '../node_modules/kinematics/src';
import * as Kinematics from '../node_modules/kinematics/src/index.js';
import * as Kinematics from '../node_modules/kinematics/src/kinematics.js'; 

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
EricSimonscommented, Mar 22, 2018

The kinematics package doesn’t appear to have any type definitions in its repo, hence why you’re probably seeing the red squiggly under it. The code itself will actually work in the preview.

We’re currently working on a way to show a different error instead of ‘module not found’ for this. Will circle back here once that’s online 👍

0reactions
nukadeliccommented, Apr 27, 2018

Would it be possible to add a build in data type generator for typescript projects ? Or at least a way to install our gist’s via npm with a simple npm install gist:fd9ca7aae60127f3d391cc4226e27401. ( I had run the dts-gen on my local machine and uploaded to a gist here but doens’t seem to work when i try and add as a npm package ☹️ )

Reference: npm gist installtion by @HugoGiraudel

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ignore missing vendor definitions · Issue #3691 - GitHub
Typescript says that "creating defintion files is easy". Yes it is, but it is only on surface. Why it is not easy: you...
Read more >
Cannot find name 'describe'. Do you need to install type ...
I'm using Visual Studio Code as my IDE and in my Angular project, and I had to comment-out/remove types in file tsconfig.json and...
Read more >
Common issues and solutions - mypy 0.991 documentation
There are several common reasons why obviously wrong code is not flagged as an error. The function containing the error is not annotated....
Read more >
TypeScript errors and how to fix them
A list of common TypeScript errors and how to fix them.
Read more >
Repo Command Reference | Android Open Source Project
If you run repo sync without arguments, it synchronizes the files for ... Ensure you don't overwhelm your machine - leave some CPU...
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