nstudio / xplat

Cross-platform (xplat) tools for Nx workspaces.
MIT License
366 stars 52 forks source link

Missing base module in libs/web/core/src/lib/index.ts after creating an Angular app #236

Closed HymanZHAN closed 3 years ago

HymanZHAN commented 3 years ago

Version of @nstudio/xplat: 11.0.13

Steps to reproduce

  1. npx create-nx-workspace@latest project-x
  2. npm i -g nx
  3. cd project-x && npm i -D @nstudio/xplat
  4. nx g app where app name is tasks
  5. Select web to create an Angular web app
  6. nx serve web-tasks
  7. Error occurs

Error output

nuvious on  master [!?] via  v14.15.1 took 1m59s
> nx serve web-tasks  

> nx run web-tasks:serve 
√ Browser application bundle generation complete.

Initial Chunk Files   | Names         |      Size
styles.css, styles.js | styles        | 353.51 kB
polyfills.js          | polyfills     | 344.73 kB
vendor.js             | vendor        | 342.85 kB
runtime.js            | runtime       |   6.15 kB
main.js               | main          |   1.95 kB

                      | Initial Total |   1.02 MB

Build at: 2021-01-07T18:31:23.353Z - Hash: b16af2261e94fdf78d13 - Time: 4821ms

Error: libs/xplat/web/core/src/lib/index.ts:1:15 - error TS2307: Cannot find module './base' or its corresponding type declarations.

1 export * from './base';

Remarks

In order versions (10.x) of xplat, a base folder with a base-component.ts containing a AppBaseComponent that inherited from the libs/core/base/base-component/BaseComponent will be created inside libs/web/core/src/lib. In the project created by the newer xplat, this folder is missing.

Is there any specific reason for this change? Should I create the base folder myself or simple remove the export * from './base statement?

Thank you!

NathanWalker commented 3 years ago

Hi @HymanZHAN thanks for reporting this. Just published 11.0.14 with this resolved. You can either generate a new app after updating to that version or you can simply delete export * from './base'; from libs/xplat/web/core/src/lib/index.ts. The base app component was moved to features.

HymanZHAN commented 3 years ago

Got it. Thanks for the quick follow up!