Ask coding questions

← Back to all posts
Typescript linting, complaining about module import
h
pkme (0)

When I import a module from a file in the source root it works, but when I import from a subfolder(scripts) typescript complains. How can I connect the subfolder's files to be able to import node modules?

I'd like to know how linting is done in replit, its not clear to me where those rules are set. I know tsconfig drives the compiler, but what drives linting?

Voters
pkme (0)
Comments
hotnewtop
xxpertHacker (871)

The IDE's syntax highlighting and intellisense rules are internals that users may not modify.

pkme (0)

@xxpertHacker Thanks for the reply, I upvoted the feature to change this.

xxpertHacker (871)

@pkme Is there a request to allow users to change the IDE?

Can you link it?

xxpertHacker (871)

The following would be relevant to this problem:

Actually, wait no, they didn't explicitly point out linting, but it's implied.

Maybe it would be better to make a feedback post explicitly focusing on linting configuration and control?

pkme (0)

@xxpertHacker these are great, I voted on all of them. I've actually stopped using typescript because these errors are so annoying.

pkme (0)

The folder is not the issue, I just realized one is a ts file the other is js. But the issue remains, what drives the module linting and why isn't it finding the node modules?

PrettyKenobi (1)

@pkme What is the exact wording of the warning/error/etc. that you're getting?

pkme (0)

@PrettyKenobi

Cannot find module 'firebase/app'.