Cannot find module '@babel/preset-plugin-transform-object-assign'

olga_babic

I just installed '@babel/preset-plugin-transform-object-assign', but it seems like webpack doesn't recognize it. I get this error when trying to build my project:

Error: Cannot find module '@babel/preset-plugin-transform-object-assign'

These are my .babelrc and package.json:

.babelrc

{
  "presets": ["@babel/preset-env", "@babel/preset-react", "@babel/plugin-transform-object-assign"]
}

package.json

{
  "name": "temp",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "watch": "webpack -w --mode development --progress --color --display-error-details",
    "build": "webpack --mode production"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "description": "",
  "devDependencies": {
    "@babel/core": "^7.0.0",
    "@babel/plugin-transform-object-assign": "^7.0.0",
    "@babel/preset-env": "^7.0.0",
    "@babel/preset-react": "^7.0.0",
    "babel-loader": "^8.0.2",
    "react": "^16.4.2",
    "react-dom": "^16.4.2",
    "react-redux": "^5.0.7",
    "redux": "^4.0.0",
    "redux-logger": "^3.0.6",
    "redux-thunk": "^2.3.0",
    "webpack": "^4.17.1",
    "webpack-cli": "^3.1.0"
  }
}
Sakhi Mansoor

In Babel, a preset is a set of plugins used to support particular language features

and @babel/plugin-transform-object-assign is plugin that you need to add in plugins like:

{
  "presets": ["@babel/preset-env", 

              "@babel/preset-react"],

  "plugins": [ "@babel/plugin-transform-object-assign"]

}

Here is a good read to understand Babel's presets and plugins

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Cannot find module 'babel-plugin-transform-decorators-legacy'

From Dev

Error: Cannot find module '@kyleshockey/object-assign-deep'

From Dev

cannot find module vue/ref-transform

From Dev

ReactJs - TypeError: Cannot assign to read only property 'transform' of object '#<Object>'

From Dev

Error: Cannot find module 'react/lib/Object.assign' from dispatcher

From Dev

Cannot find module 'eslint-plugin-angular'

From Dev

babel-core 'transform' function cannot find plugin

From Dev

Error: cannot find module object-assign after upgrading to react ^15.3 and react-dom ^15.3 for Proptypes warning

From Dev

Cordova can't add plugin: Error: Cannot find module 'unorm'

From Dev

Error: Cannot find module 'extract-text-webpack-plugin'

From Dev

Cannot find module '@babel/plugin-proposal-decorators' from '/app'

From Dev

How to setup `vite-plugin-pages`, cannot find module `~pages`

From Dev

gatsby-plugin-mdx cannot find module 'gatsby/webpack'

From Dev

Cannot find module 'html-webpack-plugin' (beginner)

From Dev

import and module.exports in Vuex module show Uncaught TypeError: Cannot assign to read only property 'exports' of object

From Dev

VSCode failed to load plugin cannot find module 'eslint-plugin-prettier'

From Dev

Dealing with "Failed to load plugin 'react' declared in '.eslintrc': Cannot find module 'eslint-plugin-react'" ESLint error

From Dev

Find and assign custom object

From Dev

webpacker Uncaught Error: Module build failed / Cannot find module 'babel-plugin-syntax-dynamic-import'

From Dev

React native babel config " Cannot find module 'babel-plugin-module-resolver' " error

From Dev

Error in cypress object model : Cannot find module '../ObjectModel/LoginPage'

From Dev

Babel object assign plugin in Gulp

From Dev

Cannot find module (a custom module)

From Dev

Mongo find transform to different object

From Dev

cannot find module file

From Dev

Cannot find module `mysql`

From Dev

Cannot find module

From Dev

Cannot find module 'prettier'

From Dev

cannot find module beautifulsoup

Related Related

  1. 1

    Cannot find module 'babel-plugin-transform-decorators-legacy'

  2. 2

    Error: Cannot find module '@kyleshockey/object-assign-deep'

  3. 3

    cannot find module vue/ref-transform

  4. 4

    ReactJs - TypeError: Cannot assign to read only property 'transform' of object '#<Object>'

  5. 5

    Error: Cannot find module 'react/lib/Object.assign' from dispatcher

  6. 6

    Cannot find module 'eslint-plugin-angular'

  7. 7

    babel-core 'transform' function cannot find plugin

  8. 8

    Error: cannot find module object-assign after upgrading to react ^15.3 and react-dom ^15.3 for Proptypes warning

  9. 9

    Cordova can't add plugin: Error: Cannot find module 'unorm'

  10. 10

    Error: Cannot find module 'extract-text-webpack-plugin'

  11. 11

    Cannot find module '@babel/plugin-proposal-decorators' from '/app'

  12. 12

    How to setup `vite-plugin-pages`, cannot find module `~pages`

  13. 13

    gatsby-plugin-mdx cannot find module 'gatsby/webpack'

  14. 14

    Cannot find module 'html-webpack-plugin' (beginner)

  15. 15

    import and module.exports in Vuex module show Uncaught TypeError: Cannot assign to read only property 'exports' of object

  16. 16

    VSCode failed to load plugin cannot find module 'eslint-plugin-prettier'

  17. 17

    Dealing with "Failed to load plugin 'react' declared in '.eslintrc': Cannot find module 'eslint-plugin-react'" ESLint error

  18. 18

    Find and assign custom object

  19. 19

    webpacker Uncaught Error: Module build failed / Cannot find module 'babel-plugin-syntax-dynamic-import'

  20. 20

    React native babel config " Cannot find module 'babel-plugin-module-resolver' " error

  21. 21

    Error in cypress object model : Cannot find module '../ObjectModel/LoginPage'

  22. 22

    Babel object assign plugin in Gulp

  23. 23

    Cannot find module (a custom module)

  24. 24

    Mongo find transform to different object

  25. 25

    cannot find module file

  26. 26

    Cannot find module `mysql`

  27. 27

    Cannot find module

  28. 28

    Cannot find module 'prettier'

  29. 29

    cannot find module beautifulsoup

HotTag

Archive