Closed jonnyparris closed 3 years ago
I am planing to support a feature that users can replace/add/remove dependencies in the package.json
as we do to the scripts
with custom scripts feature.
When this feature is implemented, you can replace "@vue-storefront/utils": "^0.0.3"
with "@vue-storefront/utils": "<another gitpkg url>"
so that this dependency is also a subdir from gitpkg.
Before this feature is implemented, here is a workaround:
You can fork this monorepo, and replace "@vue-storefront/utils": "^0.0.3"
with "@vue-storefront/utils": "<another gitpkg url>"
, and then use the subdir of your forked repo with gitpkg.
I am willing to help if there are any issues
Thanks for the fast reply!
I just tried the fork workaround but unfortunately I still get the same error that utils is missing from the npm registry.
npm install 'https://gitpkg.now.sh/jonnyparris/next/packages/core/factories?master'
gives
npm ERR! 404 '@vue-storefront/utils@^0.0.3' is not in the npm registry.
Am I missing something? It seems so promising I'm convinced I must have missed something silly.
oh wait - I just retried randomly and it worked! 🤷🏾♂️ 🤔
Thanks again
I tried this and it worked, so I guess maybe npm cache leads to the error.
You can try npm cache clean
and then install it again. Note that this command clears cache for ALL packages so the next npm install
will take a long time.
An alternative way is to specify the unique commit:
npm uninstall @vue-storefront/factories
npm install 'https://gitpkg.now.sh/jonnyparris/next/packages/core/factories?d325bfd'
oh wait - I just retried randomly and it worked! 🤷🏾♂️ 🤔
Thanks again
You're welcome! I guess this may be related to npm cache
Thanks a lot for putting this together!
I'm trying to install this package from a subfolder of VSF Next, but it depends on another unpublished package in the same monorepo here.
Is there a way around this somehow using gitpkg with scripts or similar?