Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

imported node_modules packages not resolved if editor not opened at project root #107

Open
aryzing opened this issue Apr 13, 2018 · 0 comments

Comments

@aryzing
Copy link

aryzing commented Apr 13, 2018

So say a repository's root is at ~/project, meaning the following files exist (among others):

~/project/package.json
~/project/node_modules
~/project/src/index.ts
~/project/src/tsconfig.json

Opening the editor at atom ~/project/src will cause all imports targeting node modules to be marked as missing: "Cannot find module xxx". Typescript, though, has no problem resolving modules as expected,

cd ~/project/src
../node_modules/.bin/tsc # works just fine and transpiles files as expected

The result of running the commands above will be the creation of an index.js file with the appropriate imports as configured in tsconfig.json.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant