Comments (17)
Thanks for all the information. I was able to confirm that the issue is with the use of Template Literal Types, which was introduced in TypeScript 4.1.
The offending geo.d.ts
typedef file isn't actually usable as-is and it was only introduced in the latest release. So removing it should not have any practical impact.
I'll proceed cut a release with the fix within the next hour.
from loopback-datasource-juggler.
[email protected]
has been published:
Thanks to everyone for their patience in this matter; We'll look into how we can mitigate this issue in the future.
from loopback-datasource-juggler.
Thanks for the report, currently verifying the issue at my end.
from loopback-datasource-juggler.
As an immediate, temporary solution, add the following to your package.json
:
"overrides": {
"@loopback/repository": {
"loopback-datasource-juggler": "4.26.0"
}
}
Note that this requires NPM v8 or a similarly-compatible package manager.
See https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides for more information on overrides.
from loopback-datasource-juggler.
Hi @Anu1601CS, I've just tested this at my end with the todo
example (via lb4 example
) and was not able to replicate the issue (i.e. was able to build and start the application).
I've verified that [email protected]
was in the dependency tree:
$ npm ls --depth=2 | grep -e '@loopback/repository@' -e 'loopback-datasource-juggler@'
│ │ ├── @loopback/[email protected] deduped
│ ├── @loopback/[email protected] deduped
├─┬ @loopback/[email protected]
│ ├─┬ [email protected]
│ ├── [email protected] deduped
I'm currently using Node.js v16.14.0.
Would you be able to provide more information if there's any custom configuration with your LB4 project?
from loopback-datasource-juggler.
Hi @achrinza
npm ls --depth=2 | grep -e '@loopback/repository@' -e 'loopback-datasource-juggler@'
│ ├── @loopback/[email protected] deduped
│ │ ├── @loopback/[email protected] deduped
├─┬ @loopback/[email protected]
│ └─┬ [email protected]
│ └── [email protected] deduped
Node 14x
from loopback-datasource-juggler.
Thanks for the additional info. It looks the node_modules
you're testing against is still on [email protected]
, which does not contain geo.d.ts
, which means it should not be affected by the latest release (v4.27.0).
See:
- v4.27.0: https://github.com/loopbackio/loopback-datasource-juggler/tree/74d429d52d00f4c957c586112cb1257b1f01d0e2/types
- v4.26.0: https://github.com/loopbackio/loopback-datasource-juggler/tree/06428247ad1cc48bce82d135f795fb3eaae28b33/types
This hints to me that there may be some discrepencies with the CI pipeline (e.g. It is using npm install
instead of npm ci
). Could you please cross-check if the CI pipeline's dependency tree is the same?
It also seems that an older version of @loopback/repository
is being used. If feasible, could you test if upgrading the packages solve the issue? This can be done by updating the lb4
CLI and using lb4 update
in the project root directory:
$ npm install --global @loopback/cli
$ lb4 update
from loopback-datasource-juggler.
i am looking into it
from loopback-datasource-juggler.
I am having the same problem, did you manage to solve it?
from loopback-datasource-juggler.
Hi,
I'm also facing the similar issue same as @Anu1601CS
Before it was working fine before.
This is my project dependencies
"dependencies": {
"@highcharts/map-collection": "^2.0.0",
"@loopback/authentication": "^4.1.3",
"@loopback/boot": "^1.7.4",
"@loopback/context": "^1.25.1",
"@loopback/core": "^1.12.4",
"@loopback/openapi-v3": "^1.13.0",
"@loopback/repository": "^1.19.1",
"@loopback/rest": "^1.26.1",
"@loopback/rest-explorer": "^1.4.10",
"@loopback/service-proxy": "^1.3.17",
"@types/highcharts": "5.0.16",
"@types/properties-reader": "0.0.2",
"@types/puppeteer": "^2.0.1",
"@types/winston": "^2.4.4",
"axios": "^0.19.2",
"dotenv": "^8.2.0",
"fs-extra": "^8.1.0",
"handlebars": "^4.7.6",
"highcharts": "5.0.14",
"http-errors": "^1.7.3",
"keycloak-backend": "^2.0.1",
"moment": "^2.24.0",
"moment-timezone": "^0.5.33",
"nodemailer": "^6.6.3",
"nodemailer-express-handlebars": "^4.0.0",
"path": "^0.12.7",
"properties-reader": "^2.0.0",
"puppeteer-core": "^3.0.0",
"puppeteer-pdf": "^1.2.0",
"save": "^2.4.0",
"winston": "^3.3.3",
"winston-daily-rotate-file": "^4.4.2",
"xlsx": "^0.17.0"
},
"devDependencies": {
"@loopback/build": "^2.1.0",
"@loopback/eslint-config": "^4.1.5",
"@loopback/testlab": "^1.10.3",
"@types/node": "^10.17.20",
"@types/puppeteer-core": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^2.29.0",
"@typescript-eslint/parser": "^2.29.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-eslint-plugin": "^2.2.1",
"eslint-plugin-mocha": "^6.3.0",
"nodemon": "^2.0.3",
"source-map-support": "^0.5.17",
"typescript": "^3.8.3"
}
In packagelock.json i could able to find loopback-datasource -juggler
"loopback-datasource-juggler": {
"version": "4.27.0",
"resolved": "https://registry.npmjs.org/loopback-datasource-juggler/-/loopback-datasource-juggler-4.27.0.tgz",
"integrity": "sha512-VbC2nt1Bmu/5P7Z9TR2SuQoca+dJCFCtW13mpkedXhNhlkJRDki369epcxQO0/3lVqjKaZx7usPDhwf+e22npA==",
"requires": {
"async": "^3.1.0",
"change-case": "^4.1.1",
"debug": "^4.1.0",
"depd": "^2.0.0",
"inflection": "^1.6.0",
"lodash": "^4.17.11",
"loopback-connector": "^5.0.0",
"minimatch": "^3.0.3",
"nanoid": "^3.1.20",
"qs": "^6.5.0",
"strong-globalize": "^6.0.5",
"traverse": "^0.6.6",
"uuid": "^8.3.1"
},
"dependencies": {
"depd": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="
}
}
},
from loopback-datasource-juggler.
@achrinza could you pls help on it
from loopback-datasource-juggler.
Thanks for the additional information, @dhivyapriya1998. Could you provide the OS, Node.js version, and package manager (i.e. NPM) version? It also seems like you're using an older set of LB4 packages; If feasible, could you attempt to upgrade them to the latest versions? The update steps can be found in my previous comment: #1909 (comment). Though I understand if that is not possible at the moment (See below for an immediate workaround)
@amortega Could you provide some information on your environment?
I'm currently trying to find what's commonality between these issues and why I'm not able to reproduce it at my end. So more information may help with pinpointing the issue.
As a quick reminder for those who need an immediate workaround, please follow these steps: #1909 (comment)
from loopback-datasource-juggler.
Please also provide the error that you're experiencing as well.
from loopback-datasource-juggler.
I suspect that this may be caused by incompatibility between TypeScript versions. If possible, please update these dev dependencies:
typescript
tslib
(Older LB4 projects may not have this; Not necessary if it's not already installed.)@loopback/build
(Optional)
I'll continue to investigate and try to identify the root cause from my end.
from loopback-datasource-juggler.
for me just changing to typescript version to 4.0.3 solved issue
npm: 6.14.6
node: 12.18.4
from loopback-datasource-juggler.
@achrinza
node - v14.17.0
npm - 6.14.13
OS - Windows 10
from loopback-datasource-juggler.
@achrinza Thanks
from loopback-datasource-juggler.
Related Issues (20)
- Primary key property not validated in `.create()` HOT 3
- #1785 (backport of #1782) broke some like queries on SQL DBs HOT 17
- [CI] Investigate downstream CI failure for `master` branch HOT 2
- uuid_short HOT 2
- DateString not exposed as TypeScript type - prevents use in Loopback 4 HOT 6
- bug EmbedsMany.prototype.create HOT 2
- How to create Datasource with IBM I Connector?
- Relation retrieval after parent model retrieval does not add relation to JSON output HOT 2
- Promisify relation access methods HOT 2
- model default scope with inq causes TypeError: Right-hand side of 'instanceof' is not callable
- null value not persisted for properties of type JSON, Any, or Object HOT 2
- concurrent transaction throw deadlock error HOT 2
- shortid dependency uses cluster mode and hence loopback cannot run in Passenger
- transitive dependency of a moderatly vulnerable version of nanoid HOT 1
- Dependency Dashboard
- [BUG] create helper function ignores the id property when it's equal to 0.
- `Model._forDB` is not invoked in `update` function
- Error when making multiple concurrent calls of createAll
- Default values in Model properties totally being ignored when using migrateschema 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 loopback-datasource-juggler.