Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with loopback cli version 2.6.0 #5396

Closed
chavitodb88 opened this issue May 12, 2020 · 3 comments
Closed

Problem with loopback cli version 2.6.0 #5396

chavitodb88 opened this issue May 12, 2020 · 3 comments
Labels

Comments

@chavitodb88
Copy link

I have a working environment with loopback cli version 1.18.0, but when I upgrade to new version 2.6.0 and want to create a repository I get the following error:

(node:960) UnhandledPromiseRejectionWarning: Error: Cannot load /.........../src/datasources/authentication-db.datasource.config.json: ENOENT: no such file or directory, open '/.........../src/datasources/authentication-db.datasource.config.json'
at Object.openSync (fs.js:458:3)
at Object.readFileSync (fs.js:360:35)
at readDataSourceConfigFromJSON (/usr/local/lib/node_modules/@loopback/cli/lib/utils.js:641:26)
at Object.getDataSourceConfig (/usr/local/lib/node_modules/@loopback/cli/lib/utils.js:612:5)
at Object.exports.isConnectorOfType (/usr/local/lib/node_modules/@loopback/cli/lib/utils.js:583:26)
at /usr/local/lib/node_modules/@loopback/cli/generators/repository/index.js:264:28
at Array.filter ()
at RepositoryGenerator.promptDataSourceName (/usr/local/lib/node_modules/@loopback/cli/generators/repository/index.js:263:50)
(node:960) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:960) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@dougal83
Copy link
Contributor

dougal83 commented May 12, 2020

Quite the version jump, have you checked the changelogs for the packages that have been updated? https://loopback.io/doc/en/lb4/changelog.index.html

@chavitodb88 Try renaming config file as per this comment.

@achrinza
Copy link
Member

Hi @chavitodb88, have you tried @dougal83's suggestion?

@dhmlau
Copy link
Member

dhmlau commented Jun 16, 2020

Closing due to inactivity. @chavitodb88, if you still encounter this problem after the above suggestion, please ping here or open a new issue. Thanks.

@dhmlau dhmlau closed this as completed Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants