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 badges3 Answers
Reset to default 4Adding 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
版权声明:本文标题:javascript - Could not find plugin "proposal-class-static-block" - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/p/1744063043a2527077.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论