calmm-js / kefir.atom

Composable and decomposable reactive state with lenses and Kefir
MIT License
51 stars 6 forks source link

Error while creating production build with create-react-app #8

Closed mstaniewski closed 6 years ago

mstaniewski commented 6 years ago

Hello,

There's an issue while creating production build with script provided by create-react-app.

Console output:

yarn build v0.27.5 $ node scripts/build.js Creating an optimized production build... Failed to compile.

./node_modules/kefir.atom/dist/kefir.atom.es.js Module parse failed: /Users/user/Projects/project/client/node_modules/kefir.atom/dist/kefir.atom.es.js Cannot read property '0' of undefined You may need an appropriate loader to handle this file type. TypeError: Cannot read property '0' of undefined at Array.forEach ()

error Command failed with exit code 1.

Checked you'r babel configuration in karet-shopping-cart and configured my the same way:

  "babel": {
    "presets": [
      "react-app",
      ["es2015", {"modules": false}],
      "stage-3"
    ],
    "plugins": [
      "transform-react-constant-elements"
    ]
  },

But unfortunately error still exist.

Thanks for help :)

polytypic commented 6 years ago

Perhaps this issue?

If that is the case, then you need a later version of webpack.

mstaniewski commented 6 years ago

@polytypic It was the case. Thanks for help, issue can be closed :)