mammoth-elephant-55302
02/03/2020, 12:21 PMerror: Running program '/home/xk/dp/github-testing' failed with an unhandled exception:
/home/xk/dp/github-testing/node_modules/@ibrasho/pulumi-github/index.ts:5
export * from "./branchProtection";
^^^^^^
SyntaxError: Unexpected token export
limited-rainbow-51650
02/03/2020, 12:47 PMimport
?mammoth-elephant-55302
02/03/2020, 1:05 PMlimited-rainbow-51650
02/03/2020, 1:09 PMexport
, but it should work according to this doc:
https://www.typescriptlang.org/docs/handbook/modules.html#allvalidatorststypescript
, not javascript
. See Pulumi.yaml
file.runtime: nodejs
for both. Do you have a tsconfig.json
in your project setup?mammoth-elephant-55302
02/03/2020, 1:31 PM{
"compilerOptions": {
"strict": true,
"outDir": "bin",
"target": "es2016",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"experimentalDecorators": true,
"pretty": true,
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.ts"
]
}
name: github-testing
runtime: nodejs
description: testing for github-pulumi
white-balloon-205
@ibrasho/pulumi-github
. That library appears to be published as a .ts
library, but neither Pulumi nor Node.js generally try to compile .ts
files for things in node_modules
- in general libraries published to NPM should be vanilla .js
files capable of being used by any NodeJS environment.mammoth-elephant-55302
02/03/2020, 7:40 PMimport * as github from './modules/pulumi-github/sdk/nodejs/index';
but I get
Diagnostics:
pulumi:providers:github (provider-config):
error: no resource plugin 'github' found in the workspace or on your $PATH
white-balloon-205
import * as gh from "@ibrasho/pulumi-github/bin"
will work.
It looks like the author of that library published the wrong folder. The bin
sub-folder is the root of what should have been published to NPM.mammoth-elephant-55302
02/04/2020, 4:50 AMDiagnostics:
pulumi:providers:github (default_0_1_0):
error: no resource plugin 'github-v0.1.0' found in the workspace or on your $PATH, install the plugin using `pulumi plugin install resource github v0.1.0`
.js
files correctly as far as I can tell (when I ctrl-click on the import location)white-balloon-205
pulumi-provider-github
binary on your PATH
and things will work.mammoth-elephant-55302
02/04/2020, 5:00 AMgo: extracting <http://google.golang.org/api|google.golang.org/api> v0.5.0
go install -ldflags "-X <http://github.com/ibrasho/pulumi-github/pkg/version.Version=0.1.0+dirty|github.com/ibrasho/pulumi-github/pkg/version.Version=0.1.0+dirty>" <http://github.com/ibrasho/pulumi-github/cmd/pulumi-resource-github|github.com/ibrasho/pulumi-github/cmd/pulumi-resource-github>
for LANGUAGE in "nodejs" "python" "go" ; do \
pulumi-tfgen-github $LANGUAGE --overlays overlays/$LANGUAGE/ --out sdk/$LANGUAGE/ || exit 3 ; \
done
/bin/bash: line 1: pulumi-tfgen-github: command not found
make: *** [Makefile:45: build] Error 3
I get a error: can not parse version string "0.1.0+dirty"
when I run make. do I need to do something with git or the version number to get it to build?./pulumi-resource-github: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, Go BuildID=uLUS7kOrqy1erBXjphqJ/A-fdpVPSQax-P8c9gAtO/y2TQd7XArlQe6qhuZfM3/XLuMcKoW2Is2f1LqPCbo, not stripped
~/d/d/github-testing (master|✚1…) $ /home/xk/.pulumi/bin/pulumi up
Previewing update (github-testing):
Type Name Plan Info
+ pulumi:pulumi:Stack github-testing-github-testing create
└─ pulumi:providers:github default_0_1_0 1 error
Diagnostics:
pulumi:providers:github (default_0_1_0):
error: no resource plugin 'github-v0.1.0' found in the workspace or on your $PATH, install the plugin using `pulumi plugin install resource github v0.1.0`
AFTER RENAMING ----------------------------------------
~/d/d/github-testing (master|✚1…) $ /home/xk/.pulumi/bin/pulumi up
Previewing update (github-testing):
Type Name Plan Info
+ pulumi:pulumi:Stack github-testing-github-testing create
└─ pulumi:providers:github provider-config 1 error
Diagnostics:
pulumi:providers:github (provider-config):
error: no resource plugin 'github' found in the workspace or on your $PATH
provider-config
???white-balloon-205
provider-config
appears to be the name of the resource are you are trying to create.
The error message is the same one as before - you do not have a pulumi-resource-github
binary on your path.mammoth-elephant-55302
02/04/2020, 7:07 AMpulumi-provider-github
but it was pulumi-resource-github
??
I renamed it to pulumi-provider-github
and put it into ~/go/bin/BUILD:
go install -ldflags "-X <http://github.com/ibrasho/pulumi-github/pkg/version.Version=0.1.0+dirty|github.com/ibrasho/pulumi-github/pkg/version.Version=0.1.0+dirty>" <http://github.com/ibrasho/pulumi-github/cmd/pulumi-tfgen-github|github.com/ibrasho/pulumi-github/cmd/pulumi-tfgen-github>
go install -ldflags "-X <http://github.com/ibrasho/pulumi-github/pkg/version.Version=0.1.0+dirty|github.com/ibrasho/pulumi-github/pkg/version.Version=0.1.0+dirty>" <http://github.com/ibrasho/pulumi-github/cmd/pulumi-resource-github|github.com/ibrasho/pulumi-github/cmd/pulumi-resource-github>
for LANGUAGE in "nodejs" ; do \
pulumi-tfgen-github $LANGUAGE --overlays overlays/$LANGUAGE/ --out sdk/$LANGUAGE/ || exit 3 ; \
done
/bin/bash: line 1: pulumi-tfgen-github: command not found
./pulumi-resource-github: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, Go BuildID=uLUS7kOrqy1erBXjphqJ/A-fdpVPSQax-P8c9gAtO/y2TQd7XArlQe6qhuZfM3/XLuMcKoW2Is2f1LqPCbo, not stripped
if not, how do I compile a windows version ?white-balloon-205
export GOOS=windows