microsoft / redux-dynamic-modules

Modularize Redux by dynamically loading reducers and middlewares.
https://redux-dynamic-modules.js.org
MIT License
1.07k stars 116 forks source link

How to consume master branch? #109

Closed charlesswanson closed 5 years ago

charlesswanson commented 5 years ago

Hi, I would like to use the change here: https://github.com/microsoft/redux-dynamic-modules/pull/97/commits/6271a8d0ad5415719bce9236a93e88f022196a91 It is on the master branch, but not built to npm yet.

I'm having a hard time consuming this package's master branch with my local project, because I'm not familiar with lerna.

Using "npm install microsoft/redux-dynamic-modules#master" does not work since the root package.json does not have a version.

I've also tried cloning the package locally and running

    npm install
    npm run bootstrap
    npm run build:prod

This generates paths in redux-dynamic-modules/packages:

redux-dynamic-modules/dist
redux-dynamic-modules-core/dist
redux-dynamic-modules-observable/dist
redux-dynamic-modules-react/dist

Then, in my local package I do

npm install ../../redux-dynamic-modules/packages/redux-dynamic-modules
npm install ../../redux-dynamic-modules/packages/redux-dynamic-modules-core
npm install ../../redux-dynamic-modules/packages/redux-dynamic-modules-observable
npm install ../../redux-dynamic-modules/packages/redux-dynamic-modules-react

However, the typescript loader that I'm using gives errors like:

ERROR in .-dependencies/redux-dynamic-modules/packages/redux-dynamic-modules-core/lib/Managers/MiddlewareManager.js
Module not found: Error: Can't resolve 'redux-dynamic-middlewares' in '/frontend-dependencies/redux-dynamic-modules/packages/redux-dynamic-modules-core/lib/Managers'
 @ .-dependencies/redux-dynamic-modules/packages/redux-dynamic-modules-core/lib/Managers/MiddlewareManager.js 4:34-70
 @ .-dependencies/redux-dynamic-modules/packages/redux-dynamic-modules-core/lib/index.js
 @ .-dependencies/redux-dynamic-modules/packages/redux-dynamic-modules/lib/index.js
 @ ./src/store.ts
 @ ./src/App.js
 @ ./src/main-dev.js

ERROR in [at-loader] ./node_modules/redux-dynamic-modules/node_modules/@types/react/index.d.ts:2853:13
    TS2717: Subsequent property declarations must have the same type.  Property 'polygon' must be of type 'SVGProps<SVGPolygonElement>', but here has type 'SVGProps<SVGPolygonElement>'.

I've also tried npm link without success.

Any tips for an easy way to consume the master branch's change?

Thanks

abettadapur commented 5 years ago

Hi @charlesswanson

Sorry we didnt publish! I will put up a new version right now.

abettadapur commented 5 years ago

Published 5.1.0

charlesswanson commented 5 years ago

Wow thank you for the fast help!