admin 管理员组

文章数量: 1086019

I think I might have ran into a glitch. Last night I ran into an error that said "Could not find plugin "proposal-class-static-block". Ensure there is an entry in ./available-plugins.js for it." Everytime I add or delete code in my react website it will run this error, what do i do??? I tried npm install --save-dev @babel/plugin-proposal-class-static-block but that didnt do anything at all. Anyone have a solution?

I think I might have ran into a glitch. Last night I ran into an error that said "Could not find plugin "proposal-class-static-block". Ensure there is an entry in ./available-plugins.js for it." Everytime I add or delete code in my react website it will run this error, what do i do??? I tried npm install --save-dev @babel/plugin-proposal-class-static-block but that didnt do anything at all. Anyone have a solution?

Share Improve this question asked Feb 6, 2022 at 5:44 CharlieCharlie 1251 silver badge10 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 4

Adding my fix in the event someone experiences this error.

Other people have fixed it by running an npm install and/or deleting the package-lock.json lock file and then running npm install.

Those didn't work for me so I figured out the module files causing this error are related to a conflict with older versions of babel/core and babel/preset-env. The versions that fixed my issue were:

"@babel/core": "^7.14.6", "@babel/preset-env": "^7.14.7",

I added the updated versions to my package.json and running npm install. I'm assuming this fix will work with Yarn also. If you keep getting errors when updating your modules, try running npm install --force. However, please readup on what this does if you are unfamiliar.

Deleting package-lock.json, the node_modules folder and then adding the plugin with npm install --save-dev @babel/plugin-proposal-class-static-block and in my babel configuration did the trick for me

You should try this out

npm install --save-dev @babel/plugin-proposal-class-static-block

before

npm install --force

node-modules could be deleted which makes clear installation

本文标签: javascriptCould not find plugin quotproposalclassstaticblockquotStack Overflow