-
Notifications
You must be signed in to change notification settings - Fork 13
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 no plugin supports configuration by getToken
when running in Runtime action
#33
Comments
This is because of webpack replacing the dynamic require with its own. During compile time, webpack does not know of our dynamic imports at: aio-lib-ims/src/token-helper.js Line 101 in 76f13b4
See the method for the fix here: https://stackoverflow.com/a/53074814/219684 |
@purplecabbage do you think the work you are doing on webpack reconfiguration can be leveraged to fix this issue? |
When building the library with webpack we need to include the default plugins in the bundle, an easy way to do this is to require them statically in aio-lib-ims: e.g. However, after a discussion with @shazron, this goes a bit deeper:
|
cc. @shazron this would be fixed if we get rid of the dynamic requires |
Filed #53 (internal bug is in that issue) |
PR filed #54 |
I tried
getToken
method of this lib in a Runtime action, but received an error. Code snippet:This worked when I ran in local node environment, but when running in a Runtime action, it gave an error:
I enabled the debug logs in the lib by placing
process.env.DEBUG='@adobe/aio-lib-ims*'
in the first line of my action code (before requiring@adobe/aio-lib-ims
), and this is what I got:The text was updated successfully, but these errors were encountered: