on 08-03-2021 5:51 AM
Hi community,
Today, when I try to build CAP project using command `mbt build`, the following error occurs.
INFO executing the "npx -p @sap/cds-dk cds build --production" command...
............npm ERR! code ETARGET
npm ERR! notarget No matching version found for @sap/eslint-plugin-cds@2.0.5.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of '@sap/cds-dk'
npm ERR! notarget
Version 2.0.5 of @sap/eslint-plugin-cds is not yet available in npm registry.
I tried to specify different cds-dk version by `npx -p @sap/cds-dk@4.3.3 cds build --production`, but the result was the same. Is there any way to avoid this error?
Hi @Jason Scott - Thanks for the suggestion but still getting the same error after changing the before-all command to -
user: *********$ mbt build
[2021-08-03 06:52:57] INFO Cloud MTA Build Tool version 1.1.1
[2021-08-03 06:52:57] INFO generating the "Makefile_20210803065257.mta" file...
[2021-08-03 06:52:57] INFO done
[2021-08-03 06:52:57] INFO executing the "make -f Makefile_20210803065257.mta p=cf mtar= strict=true mode=" command...
[2021-08-03 06:52:57] INFO validating the MTA project
[2021-08-03 06:52:57] INFO running the "before-all" build...
[2021-08-03 06:52:57] INFO executing the "npm install --production" command...
...npm WARN @sap/eslint-plugin-cds@2.0.4 requires a peer of eslint@>=6 but none is installed. You must install peer dependencies yourself.
up to date in 2.381s
35 packages are looking for funding
run `npm fund` for details
[2021-08-03 06:53:01] INFO executing the "npx -p @sap/cds-dk@4.3.3 cds build —production" command...
.....................postinstall cds-compiler: Successfully fixed Antlr's circular dependency
.This is CDS 2.10.3, Compiler 1.1.3, Home: ../node_modules/@sap/cds
This is CDS 2.10.3, Compiler 1.1.3, Home: ../node_modules/@sap/cds
[ERROR] No models found in '/home/user/projects/***********/—production' and configuration '/home/user/projects/*********/node_modules/@sap/cds/lib/utils/_defaults.js'. Use `cds init <project>` to create a project.
..[2021-08-03 06:53:25] ERROR the "before-all"" build failed: could not execute the "npx -p @sap/cds-dk@4.3.3 cds build —production" command: exit status 1
make: *** [Makefile_20210803065257.mta:28: pre_build] Error 1
Error: could not build the MTA project: could not execute the "make -f Makefile_20210803065257.mta p=cf mtar= strict=true mode=" command: exit status 2
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
small a typo there in Jason's comment
- npx -p @sap/cds-dk@4.3.3 cds build --production
User | Count |
---|---|
74 | |
10 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.