Comments (6)
Hi @jamesscaggs, is this a plugin that you have deployed before on your Flex instance? Also we currently only support developing plugins against the React version 16.5.2 although we are working on supporting newer versions of React. Also did you also delete the package-lock.json before running npm install?
from flex-plugin-builder.
@jamesscaggs to add to @rnairtwilio's comment, we unfortunately currently only support React v16.5.2. It must be left pinned to that older version. This is on our radar to fix this issue and allow developers to use any version of React they wish.
from flex-plugin-builder.
@rnairtwilio Yes, this flex plugin is deployed an in production.
I deleted the package-lock.json before running npm install.
The thing is my master branch package.json has the correct version of React but still throws the same error. I've been bypassing it the whole time by skipping the pre-flight check but I am hoping to get to the bottom of it.
See master branch package.json below
{
"name": "plugin-facebook-messages",
"version": "0.0.0",
"scripts": {
"bootstrap": "flex-plugin check-start",
"prebuild": "rm -rf build && npm run bootstrap",
"build": "flex-plugin build",
"clear": "flex-plugin clear",
"predeploy": "npm run build",
"deploy": "flex-plugin deploy",
"eject": "flex-plugin eject",
"info": "flex-plugin info",
"postinstall": "npm run bootstrap",
"list": "flex-plugin list",
"remove": "flex-plugin remove",
"prestart": "npm run bootstrap",
"start": "flex-plugin start",
"test": "flex-plugin test --env=jsdom"
},
"dependencies": {
"craco-config-flex-plugin": "^3.0.6",
"dotenv": "^8.2.0",
"flex-dev-utils": "^3.3.4",
"flex-plugin": "^3.0.0",
"flex-plugin-scripts": "^3.2.0",
"keytar": "^5.0.0",
"react": "16.5.2",
"react-dom": "16.5.2",
"react-scripts": "3.2.0"
},
"devDependencies": {
"@twilio/flex-ui": "^1",
"babel-polyfill": "^6.26.0",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Any other ideas?
from flex-plugin-builder.
The script checks the version by reading node_modules/react/package.json
. If it says you have v16.13.1 installed then that's the version inside your node_modules
. I would recommend deleting node_modules
and package-lock.json
and re-installing.
Also, verify the version manually by running grep version node_modules/react/package.json
and see what version is actually installed. Also, remove flex-dev-utils
- you don't/shouldn't install that package; it's a dependency of our scripts and they will install whatever version they require.
Another caveat: you may also want to upgrade craco-config-flex-plugin
, flex-plugin
, flex-plugin-scripts
, and react-scripts
to their latest versions.
from flex-plugin-builder.
I got it resolved.
Uninstalled create-flex-plugin globally
Updated my scripts and dependencies to match the migrating from 2.x to 3.x doc,
Then:
Deleted node_modules
Deleted package-lock.json
npm install
I'll go ahead and remove the dev-utils script for good measure.
Thanks!
from flex-plugin-builder.
Glad it all worked out. You can also update the create-flex-plugin
using npm install -g create-flex-plugin@latest
. You may have had an older version, but the newer versions do notify it whenever there is an update available for it.
from flex-plugin-builder.
Related Issues (20)
- [BUG] Error thrown for warning from npm-get-package-info module HOT 2
- Mixed concept of `Region HOT 1
- [BUG] Compatibility Issue with Cheerio 1.0.0 Version HOT 1
- [BUG] "Unexpected argument: --bypass-validation" in the latest version HOT 3
- [BUG] Flex Plugin isn't upgrading to the latest version HOT 2
- [BUG] - twilio flex:plugins:create plugin-sample --install --flexui2 fails HOT 1
- TaskCanvasTab Label is getting duplicated [BUG] HOT 2
- [BUG] Running `twilio flex:plugins:start` on `[email protected]` breaks the webpack dev server proxy HOT 2
- [BUG] Cannot install on Node < 18; Cannot use on Node >= 18 HOT 5
- Still using node-ipc instead of the fork HOT 3
- [BUG] Error while starting twilio flex plugin HOT 1
- [BUG] Plugins Broken when built with Twilio CLI 6.2.0 HOT 20
- [BUG] Conflicting values for 'process.env' using dotenv-webpack for env variables. HOT 3
- [FEATURE REQUEST] Node 20 Support on `@twilio/flex-plugin-scripts` HOT 1
- [BUG] Dependabot security alert on follow-redirects package HOT 1
- [BUG] Unable to deploy Twilio plugin - "Request failed with status code 400" HOT 1
- [BUG] Major Webpack version got downgraded in latest releases HOT 3
- [BUG] Module parse failure with v6.3.2 & @twilio-paste/core over v19 HOT 6
- [BUG] ##[error]Bash exited with code '254'. HOT 1
- [BUG] its seems like twilio-flex-plugin is using an older version of ip HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flex-plugin-builder.