https://pulumi.com logo
#typescript
Title
# typescript
l

limited-postman-77982

11/17/2020, 2:26 AM
Added debugging note:
Copy code
$ pulumi plugin install
error: failed to load language plugin node.js: no language plugin 'node.js' found in the workspace or on your $PATH
l

little-cartoon-10569

11/17/2020, 2:26 AM
Did you check Pulumi.yaml?
l

limited-postman-77982

11/17/2020, 2:28 AM
Hi @little-cartoon-10569 thanks for the quick response!
Copy code
name: aws-PL-Tools-ts-eks
description: AWS PL Tools EKS cluster
runtime: node.js
l

little-cartoon-10569

11/17/2020, 2:28 AM
That's the problem
l

limited-postman-77982

11/17/2020, 2:28 AM
This looked a little suspect to me, but wasn't sure.
l

little-cartoon-10569

11/17/2020, 2:28 AM
Change
runtime: node.js
to
runtime: nodejs
l

limited-postman-77982

11/17/2020, 2:29 AM
Another note, I did upgrade Pulumi versions several versions.
l

little-cartoon-10569

11/17/2020, 2:29 AM
The only problem is the runtime value.
Remove the
.
Did that help?
l

limited-postman-77982

11/17/2020, 2:31 AM
oh my, awesome! Yes that got me past that error ...
ran into another error, fixed that with npm rebuild .. but now new error 😉
Copy code
Diagnostics:
  pulumi:pulumi:Stack (aws-PL-Tools-ts-eks-PL-Tools-aws-ts-eks):
    undefined:3
    return %FunctionGetScript(func);
                                  ^
    SyntaxError: FunctionGetScript is not defined
l

little-cartoon-10569

11/17/2020, 2:33 AM
That's a code issue. I'm guessing you have a function "GetScript"?
l

limited-postman-77982

11/17/2020, 2:33 AM
yeah I was using the AWS examples in the repo, aws-eks
l

little-cartoon-10569

11/17/2020, 2:34 AM
Really? Line 3 in index.ts in that reop is
import * as awsx from "@pulumi/awsx";
...
Do you have a link to the repo you're using?
l

limited-postman-77982

11/17/2020, 2:35 AM
Looking for the GetScript
I think my index.ts is hosed ... going to try something
l

little-cartoon-10569

11/17/2020, 2:37 AM
Was just thinking that.. 🙂
git reset --hard HEAD
?
l

limited-postman-77982

11/17/2020, 2:49 AM
yes good idea
can't seem to get rid of that FunctionGetScript error.
I did a npm rebuild again ... is there something else I should do to clean it up? I didn't do a git clone from the repo I followed the get started and typed it
probably not the best choice .. 😉
l

little-cartoon-10569

11/17/2020, 2:51 AM
You could delete your lib and/or node_modules directories?
What does
npm rebuild
do? All my ts experience is from Pulumi, and I've never used it.. just
npm install
or
npm run test
.
l

limited-postman-77982

11/17/2020, 2:53 AM
Nice!
deleting node_modules and npm install got me past that ... now error:
Copy code
error: Running program '/Users/craigema/wkspace/code/PerceptiLabs-IT/pulumi/aws-ts-eks' failed with an unhandled exception:
    Error: Cannot find module '@pulumi/aws'
I removed the @pulumi/aws from config
sorry package.json
found it
l

little-cartoon-10569

11/17/2020, 3:04 AM
So if the code has an import from
@pulumi/aws
, then you'll need to have a dependency on it in package.json. You could delete package-lock.json and run
npm install
one more time, see if that sorts it
l

limited-postman-77982

11/17/2020, 3:07 AM
awesome .... I had to do that two more times after removing a typescript dependency call ... looks to be working now!
Thanks so much for you help!
hopefully I can return the favor for someone as I learn Pulumi more, coming from Terraform so I'm hoping for a fairly quick scale up 😉
👍 1