-
Notifications
You must be signed in to change notification settings - Fork 28
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
error with universal user agent in the new actions #102
Comments
I'm not sure what you mean with compiled? Do you have a build step for your code before it gets run in the action? That might be the problem, as |
Could you try to import |
by compiled I mean rather transpiled from typescript to js |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var osName = _interopDefault(require('os-name'));
function getUserAgent() {
try {
return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;
} catch (error) {
if (/wmic os get Caption/.test(error.message)) {
return "Windows <version undetectable>";
}
throw error;
}
}
exports.getUserAgent = getUserAgent;
//# sourceMappingURL=index.js.map |
No, I do not. I'm actually not sure on how to introduce it for a local (not external) action. |
I used approach of commiting and pushing my action with the However, when I tried a different recommended approach (using |
Thanks for letting us know 👍 Glad to hear that you got it working |
Hello,
I've been trying to use the new @actions/github, which allows me to create a new octokit instance and call various api methods. I've been attempting to use release apis.
The custom action i'm using is a local action, stored inside the repository.
An attempt to use the action triggers an error:
Now, seems to me that the error is caused by the fact that the "compiled" js version of the package
universal-user-agent
hasmain
pointing to the file that actually returns a function, rather than an object.part of
universal-user-agent
's package.json (inside node_modules for@octokit/endpoint
):Also that issue seems to be related to the gr2m/universal-user-agent#23
Thank you!
The text was updated successfully, but these errors were encountered: