Skip to content
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

Action throws "Toolkit is not a constructor" error #3

Closed
zdavis opened this issue Feb 1, 2019 · 3 comments · Fixed by #5
Closed

Action throws "Toolkit is not a constructor" error #3

zdavis opened this issue Feb 1, 2019 · 3 comments · Fixed by #5

Comments

@zdavis
Copy link

zdavis commented Feb 1, 2019

Still wrapping my head around Github actions, so apologies in advance if this is user error. When trying to use this action, I'm getting the following error:

Status: Downloaded newer image for node:10-slim
 ---> e1c896910d82
Step 2/12 : LABEL "com.github.actions.name"="Create an issue"
 ---> Running in 3fa47b3120c8
 ---> 0a7d8fc86e83
Step 3/12 : LABEL "com.github.actions.description"="Creates a new issue using a template with front matter."
 ---> Running in 88720431caa7
 ---> eac404b163b5
Step 4/12 : LABEL "com.github.actions.icon"="alert-circle"
 ---> Running in bed4f0fde0b6
 ---> 2cb61dc4517d
Step 5/12 : LABEL "com.github.actions.color"="gray-dark"
 ---> Running in b361774ba9b1
 ---> 5236b7451418
Step 6/12 : LABEL "repository"="http://github.com/JasonEtco/create-an-issue"
 ---> Running in faf0adddb697
 ---> f364d3933005
Step 7/12 : LABEL "homepage"="http://github.com/JasonEtco/create-an-issue"
 ---> Running in d08a45c4f1b8
 ---> 702801b35e06
Step 8/12 : LABEL "maintainer"="Jason Etcovitch <jasonetco@github.com>"
 ---> Running in 25475790fdd7
 ---> 974772ec027f
Step 9/12 : COPY package*.json ./
 ---> 5b03db0f5400
Step 10/12 : RUN npm ci
 ---> Running in 516e67cfd5c1

> fsevents@1.2.4 install /node_modules/fsevents
> node install


> nunjucks@3.1.4 postinstall /node_modules/nunjucks
> node postinstall-build.js src

added 735 packages in 13.565s
 ---> 6d58ed293080
Step 11/12 : COPY . .
 ---> d889be475787
Step 12/12 : ENTRYPOINT ["node", "/entrypoint.js"]
 ---> Running in 97a7f081f348
 ---> 9c5d8ea6e76a
Successfully built 9c5d8ea6e76a
Successfully tagged gcr.io/gct-12-kgx7e8rl4ef9xwnau6ctqt7/40b8fc6da7f452838798bd45f95fdff2e9aa51b30996936439499c96046de748/8a5edab282632443219e051e4ade2d1d5bbc671c781051bf1437897cbdfea0f1:7716aec47b53ff745f3814b6f31e8981c0d85d58806b539ffdf2a419add25985
Already have image (with digest): gcr.io/github-actions-images/action-runner:latest
/entrypoint.js:4
const tools = new Toolkit()
              ^

TypeError: Toolkit is not a constructor
    at Object.<anonymous> (/entrypoint.js:4:15)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)

### FAILED Create an issue 22:23:21Z (47.086s)
@JasonEtco
Copy link
Owner

@zdavis would you mind posting your workflow file? I'm guessing its been pinned to an older version of this action, when the actions-toolkit was not a named export.

(Also - apologies for the delay, didn't realize I wasn't watching this repo 👀)

@JasonEtco
Copy link
Owner

Turns out this is broken - this is what happens when the actions-entrypoint code isn't tested 😅 I've got a fix going out shortly! Thanks for letting me know ❤️

@zdavis
Copy link
Author

zdavis commented Feb 21, 2019

Thanks so much for looking into this and fixing it! Looking forward to circling back to this and spending more time with Github actions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants