ngx-cache icon indicating copy to clipboard operation
ngx-cache copied to clipboard

update deps

Open fulls1z3 opened this issue 4 years ago • 3 comments

** PR Checklist Please check if your PR fulfills the following requirements:

  • [x] The commit message follows our guidelines: https://github.com/fulls1z3/ngx-cache/blob/master/CONTRIBUTING.md#commit
  • [ ] Tests for the changes have been added (for bug fixes / features)
  • [ ] Docs have been added / updated (for bug fixes / features)

** PR Type What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[x] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

** What is the current behavior?

Issue Number: N/A

** What is the new behavior?

** Does this PR introduce a breaking change?

[x] Yes
[ ] No

** Other information

fulls1z3 avatar Jul 08 '21 23:07 fulls1z3

Sider has detected 1 warning on analyzing the commit 4ea43c6.

If the errors persist even after retrying, the following actions may resolve them:

If you still have problems, feel free to ask us via chat. 💬


You can turn off such notifications if unnecessary.

ghost avatar Jul 08 '21 23:07 ghost

I think I understand what the problem here maybe

So in tsconfig.json paths is used to reference core package so that it could be used by other packages ng-packagr don't use that at all that is what causes a build problem

If you just build core on its own (after updating its version in package.json) and moved it into node_modules you will be able to build other packages

If you tried to import core directly without paths you hit another problem which is the rootDir is not setup correctly you can work around this by https://github.com/ng-packagr/ng-packagr/issues/1264#issuecomment-506412050

This seems will require some restructuring from the same github issue linked above there is this library that did that restructure https://github.com/ngx-grpc/ngx-grpc

What do you think ?

m7mdbadawy avatar Jul 09 '21 13:07 m7mdbadawy

@m7mdbadawy i followed the instructions but nothing worked.

here is the output i'm getting when building http-loader from https://github.com/fulls1z3/ngx-config (same as in this repo) since it depends on the core package.these paths are clearly pointed in tools/build/tsconfig.package.json into the bundles in dist, but still not getting any luck.

➜  fulls1z3-ngx-config git:(update_deps) yarn build:http-loader
yarn run v1.22.10
$ ng-packagr -p packages/@ngx-config/http-loader/package.json -c tools/build/tsconfig.package.json
Building Angular Package

------------------------------------------------------------------------------
Building entry point '@ngx-config/http-loader'
------------------------------------------------------------------------------
Compiling TypeScript sources through ngc
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
ERROR: packages/@ngx-config/http-loader/src/config.http-loader.ts:3:30 - error TS2307: Cannot find module '@ngx-config/core' or its corresponding type declarations.

3 import { ConfigLoader } from '@ngx-config/core';
                               ~~~~~~~~~~~~~~~~~~

error Command failed with exit code 111.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

i see angular team changed the way paths are resolved from tsconfig, and not any of my efforts are helping out. i'm thinking of archiving this project since i can't go further, not any help from community and not enough time to invest to tackle this particular issue.

fulls1z3 avatar Jul 21 '21 01:07 fulls1z3