New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pulumi hangs when there is a tsconfig.json
in parent folder (even for JavaScript projects)
#1772
Milestone
Comments
So an easy thing to do would be to change how we invoke ts-node to only read a project file in the case where one was located in your In a similar vain, we could consider inspecting the root of your main folder and in cases where an |
ellismg
added a commit
that referenced
this issue
Aug 31, 2018
If a `tsconfig.json` file is not present at the root of the pulumi project, ts-node will look up the directory tree to see if there is one. If there is, it will treat that as the root of the project. While reasonable for some cases, this isn't the behavior we want for our use of ts-node. We actaully set compiler options such that in the common case you don't even need a `tsconfig.json` and for pure JavaScript projects, there wouldn't be a `tsconfig.json` file. In both of these cases, there's a big footgun waiting. For example in #1772 we ran into a case where there was a tsconfig.json file in $HOME, causing the entirety of $HOME to be analysized by TypeScript which made it look like Pulumi hung. To address this, tell ts-node to not use a project in cases where there is not a `tsconfig.json` at the root of the project. Fixes #1772
ellismg
added a commit
that referenced
this issue
Aug 31, 2018
If a `tsconfig.json` file is not present at the root of the Pulumi project, ts-node will look up the directory tree to see if there is one. If there is, it will treat that as the root of the project. While reasonable for some cases, this isn't the behavior we want for our use of ts-node. We actually set compiler options such that in the common case you don't even need a `tsconfig.json` and for pure JavaScript projects, there wouldn't be a `tsconfig.json` file. In both of these cases, there's a big foot-gun waiting. For example in #1772 we ran into a case where there was a tsconfig.json file in $HOME, causing the entirety of $HOME to be analyzed by TypeScript which made it look like Pulumi hung. To address this, tell ts-node to not use a project in cases where there is not a `tsconfig.json` at the root of the project. Fixes #1772
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I tried to
pulumi update
a program in~/go/src/github.com/pulumi/examples/aws-js-webserver
, defined in JavaScript, not TypeScript - thepulumi update
hung during preview withnode
pegging a core.Turns out, this was because I had a
tsconfig.json
in~/
. That apparently causestsnode
to see that as the root of my project and to try to compile everything underneath my home directory.Not sure what to do about this, but this is a really easy mistake to make and leads to a very bad experience.
The text was updated successfully, but these errors were encountered: