Comments (10)
Hi again.
I'm solve this issue. The problem was in the definition of the systemjs.config.
Need define new entry in package for define path to common.js. I'm try this in version 1.4 and work fine.
Same this:
map: {
// our app is within the app folder
app: 'app',
'ngx-cacheable': 'npm:ngx-cacheable/cjs',
},
// packages tells the System loader how to load when no filename and/or no extension
packages: {
app: {
defaultExtension: 'js'
},
'ngx-cacheable': {
main: 'index.js', defaultExtension: 'js'
},
**'ngx-cacheable/common': {
main: 'index.js', defaultExtension: 'js'
}**
}
Thanks for your attention.
Congratulations!!
from ts-cacheable.
Hm, can you provide an absolutely minimal reproduction of the issue? I a current out on a Holiday but will check it out when I come back :)
from ts-cacheable.
Until version 1.0.9 (included) everything works correctly, it is the last version that works for me.
In the systemjs.config.js I have the following reference:
map: {
'ngx-cacheable': 'npm: ngx-cacheable/dist'
},
packages: {
'ngx-cacheable': {
main: 'index.js', defaultExtension: 'js'
}
}
In version 1.0.9 the "dist" folder has only one level. As of version 1.1.0 it already has more levels "dist", "dist/commons" and "dist/specs". As of version 1.2.0, the "dist" level disappears but the commons and specs folder exists.
I have tried with all versions and the error is always the same "GET https://localhost:44391/node_modules/ngx-cacheable/dist/common.js 404".
Take this opportunity to congratulate you on your library, it works great.
Enjoy holidays.
from ts-cacheable.
Right, before I was wrongly publishing out of the root folder which actually deployed the source files too. So now, the lib is published out of dist/
itself.
Can you try changing the config in your system file to:
map: {
'ngx-cacheable': 'npm: ngx-cacheable'
},
from ts-cacheable.
I had already tried this, and with that configuration I still have the same error.
I have also tried to put the path in the tsconfig.js file. But, the result is the same.
"paths": {
"jszip": [
"node_modules/jszip/dist/jszip.min.js"
],
"ngx-cacheable": [ "node_modules/ngx-cacheable/index.js" ]
}
from ts-cacheable.
@ToniSoriano Thanks for the screenshot. Unfortunately I can't reproduce this right now so if you could please create a stackblitz with this being reproduced, it will help immensely.
from ts-cacheable.
Hi. I have found an alternative way to solve the problem.
It is about creating a common.js file in the root folder with the same code of the /common/index.js folder.
But it is not a good solution.
I write this in case it helps you to find the problem
Thanks.
from ts-cacheable.
@ToniSoriano Can you test your issue with 1.4.0-beta.11. It is a version of ngx-cacheable
which changes the module structure output to esm, cjs and es2015 modules.
from ts-cacheable.
Thanks @angelnikolov.
I try with 1.4.0-beta.12 but in cjs have same problem, and the others protocols have a error TS¿?.
I will keep trying.
from ts-cacheable.
@ToniSoriano Glad you solved it :))
from ts-cacheable.
Related Issues (20)
- Does Ts-Cachable support typed observables? HOT 4
- StorageStrategy - removeAtIndex add entity to parameters HOT 7
- GlobalCacheConfig.storageStrategy not used in Angular 9? HOT 7
- Possibility to cache per instance HOT 7
- JSON parse type issues HOT 4
- Cache query params HOT 2
- Refresh data HOT 7
- invoking a function after maxAge ends HOT 1
- How to keep cache isolated between different users ? HOT 5
- inMemoryStorageStrategy: What is the in-memory size that can be utilized using the cacheable decorator? HOT 2
- Does this work with subscribe? HOT 1
- [@CacheBuster()][Feature Proposal] Instant cache busting HOT 3
- Caching for urls without parameters
- Adapt description about "Cache busting" when different parameters are used HOT 4
- Observable<XXXXXX>>' is not assignable to parameter of type 'TypedPropertyDescriptor<ICacheable<Observable<any>>>'. HOT 4
- Support for optional parameters HOT 2
- Question: Serve the cached response and get the latest data in background HOT 2
- Async storage strategies with observable @Cacheable decorator HOT 1
- globalCacheBusterNotifier not working when using PCacheable decorator HOT 2
- Question: How to set Storage Strategy at Global Level HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ts-cacheable.