简体   繁体   中英

Error: Cannot find module '@babel/plugin-proposal-class-properties'

Require stack:

  • C:\As Sunnah Store\as_sunnah_client\node_modules@babel\preset-env\lib\available-plugins.js
  • C:\As Sunnah Store\as_sunnah_client\node_modules@babel\preset-env\lib\filter-items.js
  • C:\As Sunnah Store\as_sunnah_client\node_modules@babel\preset-env\lib\index.js
  • C:\As Sunnah Store\as_sunnah_client\node_modules\workbox-build\build\lib\bundle.js
  • C:\As Sunnah Store\as_sunnah_client\node_modules\workbox-webpack-plugin\build\generate-sw.js
  • C:\As Sunnah Store\as_sunnah_client\node_modules\workbox-webpack-plugin\build\index.js
  • C:\As Sunnah Store\as_sunnah_client\node_modules\react-scripts\config\webpack.config.js
  • C:\As Sunnah Store\as_sunnah_client\node_modules\react-scripts\scripts\start.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) at Function.Module._load (node:internal/modules/cjs/loader:778:27) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object. (C:\As Sunnah Store\as_sunnah_client\node_modules@babel\preset-env\lib\available-plugins.js:40:38) at Module._compile (node:internal/modules/cjs/loader:1103:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) { code: 'MODULE_NOT_FOUND', requireStack: [ 'C:\As Sunnah Store\as_sunnah_client\node_modules\@babel\preset-env\lib\available-plugins.js', 'C:\As Sunnah Store\as_sunnah_client\node_modules\@babel\preset-env\lib\filter-items.js', 'C:\As Sunnah Store\as_sunnah_client\node_modules\@babel\preset-env\lib\index.js', 'C:\As Sunnah Store\as_sunnah_client\node_modules\workbox-build\build\lib\bundle.js', 'C:\As Sunnah Store\as_sunnah_client\node_modules\workbox-webpack-plugin\build\generate-sw.js', 'C:\As Sunnah Store\as_sunnah_ client\node_modules\workbox-webpack-plugin\build\index.js', 'C:\As Sunnah Store\as_sunnah_client\node_modules\react-scripts\config\webpack.config.js', 'C:\As Sunnah Store\as_sunnah_client\node_modules\react-scripts\scripts\start.js' ] }

How can I fix this problem

You can try installing @babel/plugin-proposal-class-properties :

npm install --save @babel/plugin-proposal-class-properties

If you have already installed babel

In your directory check the file containing the packages you have installed and make sure that the symbol: @ was added before the babel import. Also, make sure the package numbers are in sync.

ex: "@babel/core": "^7.10.1"

If you have not installed it yet

Go to your terminal and type this command to install the latest version:

npm install --save-dev @babel/plugin-proposal-class-properties

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM