pulumi / docs

All things Pulumi docs!
https://pulumi.com
Apache License 2.0
127 stars 221 forks source link

Unable to generate documentation #1337

Closed stack72 closed 5 years ago

stack72 commented 5 years ago

I am unable to generate any documentation for the providers. I initially thought it was because of a new provider I created...

tls
Generating typedocs
~/Code/go/src/github.com/pulumi/pulumi-tls/sdk/nodejs ~/Code/go/src/github.com/pulumi/docs
make: *** No rule to make target `ensure'.  Stop.

Using TypeScript 3.3.4000 from /Users/stack72/Code/go/src/github.com/pulumi/docs/node_modules/typedoc/node_modules/typescript/lib
Error: /Users/stack72/code/go/src/github.com/pulumi/pulumi-tls/sdk/nodejs/certRequest.ts(3)
 Cannot find module '@pulumi/pulumi'.
Error: /Users/stack72/code/go/src/github.com/pulumi/pulumi-tls/sdk/nodejs/getPublicKey.ts(3)
 Cannot find module '@pulumi/pulumi'.
Error: /Users/stack72/code/go/src/github.com/pulumi/pulumi-tls/sdk/nodejs/locallySignedCert.ts(3)
 Cannot find module '@pulumi/pulumi'.
Error: /Users/stack72/code/go/src/github.com/pulumi/pulumi-tls/sdk/nodejs/privateKey.ts(3)
 Cannot find module '@pulumi/pulumi'.
Error: /Users/stack72/code/go/src/github.com/pulumi/pulumi-tls/sdk/nodejs/provider.ts(3)
 Cannot find module '@pulumi/pulumi'.
Error: /Users/stack72/code/go/src/github.com/pulumi/pulumi-tls/sdk/nodejs/selfSignedCert.ts(3)
 Cannot find module '@pulumi/pulumi'.
Error: /Users/stack72/code/go/src/github.com/pulumi/pulumi-tls/sdk/nodejs/utilities.ts(6)
 Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig.
Error: /Users/stack72/code/go/src/github.com/pulumi/pulumi-tls/sdk/nodejs/utilities.ts(41)
 Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig.

But its the same for the AWS provider as well

Error: /Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/nodejs/wafregional/rateBasedRule.ts(3)
 Cannot find module '@pulumi/pulumi'.
Error: /Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/nodejs/wafregional/regexMatchSet.ts(3)
 Cannot find module '@pulumi/pulumi'.
Error: /Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/nodejs/wafregional/regexPatternSet.ts(3)
 Cannot find module '@pulumi/pulumi'.
Error: /Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/nodejs/wafregional/rule.ts(3)
 Cannot find module '@pulumi/pulumi'.
Error: /Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/nodejs/wafregional/ruleGroup.ts(3)
 Cannot find module '@pulumi/pulumi'.
Error: /Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/nodejs/wafregional/sizeConstraintSet.ts(3)
 Cannot find module '@pulumi/pulumi'.
Error: /Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/nodejs/wafregional/sqlInjectionMatchSet.ts(3)
 Cannot find module '@pulumi/pulumi'.
Error: /Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/nodejs/wafregional/webAcl.ts(3)
 Cannot find module '@pulumi/pulumi'.
Error: /Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/nodejs/wafregional/webAclAssociation.ts(3)
 Cannot find module '@pulumi/pulumi'.
Error: /Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/nodejs/wafregional/xssMatchSet.ts(3)
 Cannot find module '@pulumi/pulumi'.
Error: /Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/nodejs/worklink/fleet.ts(3)
 Cannot find module '@pulumi/pulumi'.
Error: /Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/nodejs/worklink/websiteCertificateAuthorityAssociation.ts(3)
 Cannot find module '@pulumi/pulumi'.
Error: /Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/nodejs/workspaces/getBundle.ts(3)
 Cannot find module '@pulumi/pulumi'.
Error: /Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/nodejs/xray/samplingRule.ts(3)
 Cannot find module '@pulumi/pulumi'.

This has only started happening in the past week for me so something may have changed that I am not doing correctly

chrsmith commented 5 years ago

@justinvp could you PTAL? I assume this was changed as part of the website switch over, but I don't know enough about how the API doc generation works to know where to look.

justinvp commented 5 years ago

@ellismg, can you take a look? It looks like your changes in 8e3906c23b334775e0c9c3287efebb63abaf88f7 (#1298) is the cause of the regression.

If I checkout the commit prior, I'm able to generate the docs:

git checkout 8e3906c23b334775e0c9c3287efebb63abaf88f7^
PKGS=aws ./scripts/run_typedoc.sh
aws
Generating typedocs
~/go/src/github.com/pulumi/pulumi-aws ~/go/src/github.com/pulumi/docs
Removing vendor/
ENSURE:
GO111MODULE=on go mod vendor
github.com/terraform-providers/terraform-provider-aws
BUILD:
go install -ldflags "-X github.com/pulumi/pulumi-aws/pkg/version.Version=v0.18.21" github.com/pulumi/pulumi-aws/cmd/pulumi-resource-aws
go install -ldflags "-X github.com/pulumi/pulumi-aws/pkg/version.Version=v0.18.21" github.com/pulumi/pulumi-aws/cmd/pulumi-tfgen-aws
...

If I checkout the commit from #1298 (and anything later), I get the same issue that Paul is seeing:

git checkout 8e3906c23b334775e0c9c3287efebb63abaf88f7
PKGS=aws ./scripts/run_typedoc.sh
aws
Generating typedocs
~/go/src/github.com/pulumi/pulumi-aws/sdk/nodejs ~/go/src/github.com/pulumi/docs
make: *** No rule to make target `ensure'.  Stop.

Using TypeScript 3.3.4000 from /Users/justin/go/src/github.com/pulumi/docs/node_modules/typedoc/node_modules/typescript/lib
Error: /Users/justin/go/src/github.com/pulumi/pulumi-aws/sdk/nodejs/acm/certificate.ts(3)
 Cannot find module '@pulumi/pulumi'.
...
justinvp commented 5 years ago

Ah, @ellismg, I didn't realize you're on vacation. I'll take a look at fixing the script.