You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building it with ncc build src/main.ts -o dist and executing it returns
console.log(core_1.default.getInput("foo"));
^
TypeError: Cannot read properties of undefined (reading 'getInput')
I've found that by converting the import statement to a require statement, const core = require("@actions/core"); the code executes successfully.
I've also found that core, first-party node modules like fs can be imported via an import statement as well as my local code while any third-party modules I tried have the above error.
I'm running ncc version 0.38.0
Here is my tsconfig.json file:
I have the following typescript code:
Building it with
ncc build src/main.ts -o dist
and executing it returnsI've found that by converting the import statement to a require statement,
const core = require("@actions/core");
the code executes successfully.I've also found that core, first-party node modules like
fs
can be imported via animport
statement as well as my local code while any third-party modules I tried have the above error.I'm running ncc version
0.38.0
Here is my tsconfig.json file:
edit: corrected the ncc version number.
The text was updated successfully, but these errors were encountered: