-
Notifications
You must be signed in to change notification settings - Fork 55
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
[BUG] Plugins Broken when built with Twilio CLI 6.2.0 #842
Comments
Hi @moretalk. We are unable to reproduce this with a vanilla Flex Plugin without any modifications. Have you modified the webpack config in your plugin code? Please note that in the latest version of the Plugin CLI (6.2.0), we have moved to webpack 5. I would recommend checking if you are using any dependency that is not compatible with webpack 5. |
There is definitely an issue with css loader, here we can no longer start if we import a simple .scss in the plugin. Nothing changed in the webpack config.
|
I agree with @tmbdrogba. We have made no modifications to webpack config and we are finding that any npm package containing JSX fails. |
Thanks for the info @tmbdrogba and @moretalk . We will investigate this further and release a fix soon |
I'm also getting an error, albiet different ones. We have a few plugins, and they fail in different ways.
Is there any way to downgrade the flex plugin installed to the cli? Doesn't seem like Edit: can specify the version in the installation command with |
Facing same issue in console "global is not defined" for one of my plugins after I had to re-install Before that the plugin was working fine was working fine A workaround I thought was to do this at the very beginning of my plugin -
|
We have released the fix for this issue in v6.2.1. Please upgrade your Plugins CLI and check again. |
@aishwarya-tw Updated But still facing the issue. For me I think its not related to css, I think its related to draft-js which I have used in my plugin for some features. Please check the stack trace of the error.
|
@ypatel118 Are you are seeing this error in the browser console when you run the plugin during local development? Can you please confirm that this issue did not exist in v6.1.2? |
@aishwarya-tw Yes I'm seeing this error in browser console but not just during local development, it also happens when I deploy and check on flex. Yes I can confirm that this issue didn't happened in v6.1.2. |
Thank you. We will investigate further and release a fix if necessary. |
@ypatel118 We have released a new patch version v6.2.2 with the fix, Please check and confirm. |
@ypatel118 , |
@shyamasish-twilio What kind of details do you need? FYI, I am using buffer module for following use case:
|
@shyamasish-twilio @aishwarya-tw Any updates? |
@ypatel118 Hi. With the webpack 5 upgrade, all the native node libraries require a polyfill in the webpack config for webpack to understand it in the browser environment. If you'd like to be on webpack 5, please refer the solution here and make the required changes in your plugin webpack.config.js otherwise, we would highly recommend using |
@ypatel118 , |
@shyamasish-twilio Confirming, issue resolved in v6.3.1. Thanks for the efforts. |
@ypatel118 Thanks for confirming. Closing the issue. |
Description
A clear and concise description of what the bug is.
Versions
You can find the version of your
@twilio/plugin-flex
by typingtwilio plugins
.@twilio-labs/plugin-flex
6.2.0
flex-plugin-scripts
6.2.0
node
16.19.1
npm
8.19.3
Package.json
Please include the entire content of your
package.json
.{ "name": "plugin-ciptex-template", "version": "0.2.0", "private": true, "scripts": { "build": "twilio flex:plugins:build", "preinstall": "./preinstall.mjs", "postinstall": "flex-plugin pre-script-check", "start": "twilio flex:plugins:start --include-remote" }, "dependencies": { "@ciptex/race-ui": "^1.28.13", "@twilio/flex-plugin-scripts": "^6.2.0", "react": "16.13.1", "react-dom": "16.13.1", "react-emotion": "9.2.12" }, "devDependencies": { "@twilio/flex-ui": "^1.34.4", "@typescript-eslint/eslint-plugin": "^6.7.4", "@typescript-eslint/parser": "^6.7.4", "eslint": "^8.50.0", "eslint-plugin-react": "^7.33.2", "react-test-renderer": "^16.13.1", "typescript": "^5.2.2" } }
Steps to Reproduce
Please provide the steps to reproduce this bug:
twilio flex:plugins:build
Plugins built using 6.2.0 of CLI Plugin produce the error that
Uncaught ReferenceError: global is not defined
when loaded in flex and contain incorrect references toglobal.CSS
in the code. Replicated this behaviour across every plugin.Plugins function as expected when built with 6.1.2 can contain no reference to
global
Expected Behavior
Plugins to Build and work as expected
The text was updated successfully, but these errors were encountered: