https://pulumi.com logo
#general
Title
# general
n

nutritious-pager-34892

03/13/2020, 11:48 PM
@gentle-diamond-70147 Do you have a working version of that typescript example? I tried it and it has type issues because of package scp2 and seems there are more errors too as I tried to remove just that part and still get them.
g

gentle-diamond-70147

03/13/2020, 11:49 PM
n

nutritious-pager-34892

03/13/2020, 11:49 PM
Yes, that has errors on my machine.
g

gentle-diamond-70147

03/13/2020, 11:50 PM
Hmm, I ran it the other day and it worked.
What are the errors you’re getting?
n

nutritious-pager-34892

03/13/2020, 11:50 PM
I wonder whether your tsconfig may be what is different since there is not one in that repository.
First error I get is this: Could not find a declaration file for module ‘scp2’. ‘/Users/Google Drive/Sources/home/infrastructure/quickstart/node_modules/scp2/index.js’ implicitly has an ‘any’ type.  Try
npm install @types/scp2
if it exists or add a new declaration (.d.ts) file containing `declare module ‘scp2’;`ts(7016)
@types/scp2 doesn’t exist in npm and I don’t know how to make that d.ts file
Copy code
I also see these errors:     provisioners/index.ts(47,18): error TS7006: Parameter 'err' implicitly has an 'any' type.
    provisioners/index.ts(94,41): error TS7006: Parameter 'code' implicitly has an 'any' type.
    provisioners/index.ts(94,47): error TS7006: Parameter 'signal' implicitly has an 'any' type.
    provisioners/index.ts(101,36): error TS7006: Parameter 'data' implicitly has an 'any' type.
    provisioners/index.ts(173,63): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
      Type 'undefined' is not assignable to type 'string'.
this is my tsconfig as generated by pulumi init:
Copy code
{
  "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"
  ]
}