netgum / archanova

Archanova monorepo
https://archanova.io/
19 stars 11 forks source link

Breaks react-scripts webpack dev environment #40

Closed pedrouid closed 4 years ago

pedrouid commented 5 years ago

This is a follow-up to issue #39, I've moved away from a Typescript environment with react-scripts-ts and I'm using the latest react-scripts@3.0.1 from create-react-app@3.0.1.

I'm still getting issues with the dev environment but this time with the following error: TypeError: Cannot destructure propertycreateHashof 'undefined' or 'null'.

However I've also tested it with the boilerplate create-react-app without any of my code and just installing the @archanova/sdk and it worked

But can't get it to work with my setup which has the following dependencies:

{
  "dependencies": {
    "@archanova/sdk": "^1.0.0",
    "@netgum/utils": "^0.1.3",
    "axios": "^0.19.0",
    "connected-react-router": "^6.5.2",
    "history": "^4.9.0",
    "prop-types": "^15.7.2",
    "react": "^16.8.6",
    "react-dom": "^16.8.6",
    "react-redux": "^7.1.0",
    "react-router-dom": "^5.0.1",
    "react-scripts": "3.0.1",
    "redux": "^4.0.1",
    "redux-thunk": "^2.3.0",
    "styled-components": "^4.2.1"
  }
}
pedrouid commented 5 years ago

I found a workaround online, the issue came was due to mini-css-extract-plugin so I first installed it in devDependencies but that didn't work.

However when I also installed to the devDependencies, I was able to get it to work. Not sure why this is happening but you can take a look at the following issue that I used as a guide

https://github.com/webpack-contrib/mini-css-extract-plugin/issues/69

The versions installed are mini-css-extract-plugin@0.8.0 and webpack@4.36.1

stanislaw-glogowski commented 4 years ago

Please use playground code as an example of create-react-app https://github.com/netgum/archanova/tree/develop/packages/sdk-playground