running unit tests of schematics/scully - scully

After having forked scully, running npm test from the root folder launches jest tests but doesn't launch the unit tests with jasmine under ./schematics/scully.
When running npm test from under ./schematics/scully, it doesn't work:
git clone git#github.com:atao60/scully.git
cd scully/schematics/scully
npm i
npm i -D guess-parser#^0.4.13 #angular/core#"^8.0.0 || ^9.0.0-0" #angular/common#"^8.0.0 || ^9.0.0-0"
npm i -D bufferutil#^4.0.1 utf-8-validate#^5.0.2 zone.js#~0.10.3 typescript#"~3.7.5 || ~3.8.0"
npm test
#
# > #scullyio/init#0.0.26 test /home/pierre/DevSpace/gh-pages-explo/scully/schematics/scully
# > npm run build && jasmine src/**/*_spec.js
#
#
# > #scullyio/init#0.0.26 build /home/pierre/DevSpace/gh-pages-explo/scully/schematics/scully
# > tsc -p tsconfig.json
#
# Randomized with seed 75077
# Started
# FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
#
# Failures:
# 1) add-post when using `metaDataFile` option should add the meta data but keep title from options
# Message:
# Error: Cannot find module '#schematics/angular/package.json'
# Require stack:
# - /home/pierre/DevSpace/gh-pages-explo/scully/schematics/scully/node_modules/#angular-devkit/schematics/tools/node-module-engine-host.js
# - /home/pierre/DevSpace/gh-pages-explo/scully/schematics/scully/node_modules/#angular-devkit/schematics/tools/workflow/node-workflow.js
# - /home/pierre/DevSpace/gh-pages-explo/scully/schematics/scully/node_modules/#angular-devkit/schematics/tools/index.js
# - /home/pierre/DevSpace/gh-pages-explo/scully/schematics/scully/node_modules/#angular-devkit/schematics/testing/schematic-test-runner.js
# - /home/pierre/DevSpace/gh-pages-explo/scully/schematics/scully/node_modules/#angular-devkit/schematics/testing/index.js
# - /home/pierre/DevSpace/gh-pages-explo/scully/schematics/scully/src/add-blog/index_spec.js
# - /home/pierre/DevSpace/gh-pages-explo/scully/schematics/scully/node_modules/jasmine/lib/jasmine.js
# - /home/pierre/DevSpace/gh-pages-explo/scully/schematics/scully/node_modules/jasmine/bin/jasmine.js
# Stack:
# error properties: Object({ code: 'MODULE_NOT_FOUND', requireStack: [ '/home/pierre/DevSpace/
# [...]
#
# 33 specs, 33 failures
# Finished in 0.465 seconds
# Randomized with seed 75077 (jasmine --random=true --seed=75077)
# npm ERR! Test failed. See above for more details.
It seems I missed something obvious but I can't figure out what. Any clue'd be welcome.

Related

How does one install coq-serapi for coq 8.10 using opam pin and ideally using a commit from coq-serapi?

I tried finding the version compatible with coq 8.10 and installing it via opam pin but it's output is odd:
opam pin add -y coq-serapi git+https://github.com/ejgallego/coq-serapi.git#b6c7a46a8942b43cfd6a6e7d5fa3b155f17f1766
output:
(iit_synthesis) brando9~ $ opam pin add -y coq-serapi git+https://github.com/ejgallego/coq-serapi.git#b6c7a46a8942b43cfd6a6e7d5fa3b155f17f1766
[coq-serapi.8.10.0+0.7.2] synchronised (git+https://github.com/ejgallego/coq-serapi.git#b6c7a46a8942b43cfd6a6e7d5fa3b155f17f1766)
[WARNING] Failed checks on coq-serapi package definition from source at
git+https://github.com/ejgallego/coq-serapi.git#b6c7a46a8942b43cfd6a6e7d5fa3b155f17f1766:
warning 62: License doesn't adhere to the SPDX standard, see https://spdx.org/licenses/: "GPL 3"
coq-serapi is now pinned to git+https://github.com/ejgallego/coq-serapi.git#b6c7a46a8942b43cfd6a6e7d5fa3b155f17f1766 (version 8.10.0+0.7.2)
The following actions will be performed:
↻ recompile coq-serapi 8.10.0+0.7.2*
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
⬇ retrieved coq-serapi.8.10.0+0.7.2 (git+https://github.com/ejgallego/coq-serapi.git#b6c7a46a8942b43cfd6a6e7d5fa3b155f17f1766)
[ERROR] The compilation of coq-serapi.8.10.0+0.7.2 failed at "dune build -p coq-serapi -j 127".
#=== ERROR while compiling coq-serapi.8.10.0+0.7.2 ============================#
# context 2.1.4 | linux/x86_64 | ocaml-base-compiler.4.07.1 | pinned(git+https://github.com/ejgallego/coq-serapi.git#b6c7a46a8942b43cfd6a6e7d5fa3b155f17f1766#b6c7a46a)
# path ~/.opam/coq-8.10/.opam-switch/build/coq-serapi.8.10.0+0.7.2
# command ~/.opam/coq-8.10/bin/dune build -p coq-serapi -j 127
# exit-code 1
# env-file ~/.opam/log/coq-serapi-807247-646161.env
# output-file ~/.opam/log/coq-serapi-807247-646161.out
### output ###
# Error: The implementation serlib/plugins/ltac/ser_tacentries.ml
# [...]
# type 'a grammar_tactic_prod_item_expr =
# 'a Ltac_plugin.Tacentries.grammar_tactic_prod_item_expr
# File "serlib/plugins/ltac/ser_tacentries.mli", line 19, characters 0-83:
# Expected declaration
# File "plugins/ltac/tacentries.mli", line 25, characters 0-156:
# Actual declaration
# (cd _build/default && /lfs/ampere1/0/brando9/.opam/coq-8.10/bin/ocamlopt.opt -w -40 -rectypes -g -ppx '.ppx/57e0400f3b219ff4fc65d1fbd820e35d/ppx.exe --as-ppx --cookie '\''library-name="serlib_ltac"'\''' -I serlib/plugins/ltac/.serlib_ltac.objs/byte -I serlib/plugins/ltac/.serlib_ltac.objs/native -I /lfs/ampere1/0/brando9/.opam/coq-8.10/lib/base/caml -I /lfs/ampere1/0/brando9/.opam/coq-8.10/li[...]
# File "plugins/ltac/tacenv.mli", line 74, characters 0-379:
# Error: This variant or record definition does not match that of type
# Ltac_plugin.Tacenv.ltac_entry
# The types for field tac_body are not equal.
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build coq-serapi 8.10.0+0.7.2
└─
╶─ No changes have been performed
[NOTE] Pinning command successful, but your installed packages may be out of sync.
does someone know how to fix it? Is it just trying other commits until it works?
commits: https://github.com/ejgallego/coq-serapi/commits/b6c7a46a8942b43cfd6a6e7d5fa3b155f17f1766
related: requesting commit for coq-serapi from mantainer: https://github.com/ejgallego/coq-serapi/issues/319

Commands not recognised in GitHub Action Mocha tests

My unit tests pass when run locally. When executed by a GitHub Action when a branch is committed, this action
on:
push:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
- '!master' # excludes master
workflow_dispatch:
inputs:
build:
description: Unit tests
type: boolean
required: true
default: "true"
jobs:
build:
strategy:
matrix:
os: [windows-latest]
# os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout#v2
- name: Install Node.js
uses: actions/setup-node#v1
with:
node-version: 16.x
- run: npm install
- run: npm i gulp gulp-cli -g
if: runner.os == 'MacOS'
- run: gulp
- run: xvfb-run -a npm test
if: runner.os == 'Linux'
- run: npm test
if: runner.os != 'Linux'
basically runs npm test.
When I do that locally, it works fine:
npm test
> vscode-print#0.9.25 test
> node ./out/test/runTest.js
Debugger listening on ws://127.0.0.1:63067/252bd7f9-c748-45b4-b9e6-8ba21e9fc909
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
Found existing install in C:\Users\Peter\source\vsc-print\.vscode-test\vscode-win32-x64-archive-1.68.1. Skipping download
[16792:0704/000228.095:ERROR:node_bindings.cc(286)] Most NODE_OPTIONs are not supported in packaged apps. See documentation for more details.
[16792:0704/000228.095:ERROR:node_bindings.cc(286)] Most NODE_OPTIONs are not supported in packaged apps. See documentation for more details.
[main 2022-07-03T14:02:28.455Z] update#ctor - updates are disabled by the environment
[main 2022-07-03T14:02:29.679Z] Starting extension host with pid 32 (fork() took 15 ms).
Loading development extension at c:\Users\Peter\source\vsc-print
Decryption failed
Print Extension Test Suite
✔ Check platform browser launch command on win32 (200ms)
✔ Check platform alternate browser launch command on win32 (112ms)
✔ Print active editor (304ms)
Could not find the language 'jsonc', did you forget to load/include a language module?
✔ Print folder (812ms)
4 passing (2s)
[main 2022-07-03T14:02:32.887Z] Extension host with pid 32 exited with code: 0, signal: null.
Exit code: 0
Done
Waiting for the debugger to disconnect...
When the Action runs it, this is the output.
Downloaded VS Code into D:\a\vsc-print\vsc-print\.vscode-test\vscode-win32-x64-archive-1.68.1
[main 2022-07-03T13:06:32.496Z] update#ctor - updates are disabled by the environment
workbench#open()
[main 2022-07-03T13:06:37.868Z] Calling fork to start extension host...
[main 2022-07-03T13:06:37.879Z] Starting extension host with pid 776 (fork() took 11 ms).
IExtensionHostStarter.start() took 42 ms.
Loading development extension at d:\a\vsc-print\vsc-print
Print Extension Test Suite
1) Check platform browser launch command on win32
Error: 4 tests failed.
2) Check platform alternate browser launch command on win32
3) Print active editor
at d:\a\vsc-print\vsc-print\out\test\suite\index.js:25:27
4) Print folder
at done (d:\a\vsc-print\vsc-print\node_modules\mocha\lib\mocha.js:1009:7)
0 passing (518ms)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
4 failing
1) Print Extension Test Suite
Check platform browser launch command on win32:
Error: command 'extension.test.browserLaunchCommand' not found
at v._tryExecuteCommand (vscode-file://vscode-app/d:/a/vsc-print/vsc-print/.vscode-test/vscode-win32-x64-archive-1.68.1/resources/app/out/vs/workbench/workbench.desktop.main.js:1706:3532)
at v.executeCommand (vscode-file://vscode-app/d:/a/vsc-print/vsc-print/.vscode-test/vscode-win32-x64-archive-1.68.1/resources/app/out/vs/workbench/workbench.desktop.main.js:1706:3414)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
2) Print Extension Test Suite
Check platform alternate browser launch command on win32:
Error: command 'extension.test.browserLaunchCommand' not found
at v._tryExecuteCommand (vscode-file://vscode-app/d:/a/vsc-print/vsc-print/.vscode-test/vscode-win32-x64-archive-1.68.1/resources/app/out/vs/workbench/workbench.desktop.main.js:1706:3532)
at v.executeCommand (vscode-file://vscode-app/d:/a/vsc-print/vsc-print/.vscode-test/vscode-win32-x64-archive-1.68.1/resources/app/out/vs/workbench/workbench.desktop.main.js:1706:3414)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
3) Print Extension Test Suite
Print active editor:
Error: command 'extension.test.flags' not found
at v._tryExecuteCommand (vscode-file://vscode-app/d:/a/vsc-print/vsc-print/.vscode-test/vscode-win32-x64-archive-1.68.1/resources/app/out/vs/workbench/workbench.desktop.main.js:1706:3532)
at v.executeCommand (vscode-file://vscode-app/d:/a/vsc-print/vsc-print/.vscode-test/vscode-win32-x64-archive-1.68.1/resources/app/out/vs/workbench/workbench.desktop.main.js:1706:3414)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
4) Print Extension Test Suite
Print folder:
Error: command 'extension.test.flags' not found
at v._tryExecuteCommand (vscode-file://vscode-app/d:/a/vsc-print/vsc-print/.vscode-test/vscode-win32-x64-archive-1.68.1/resources/app/out/vs/workbench/workbench.desktop.main.js:1706:3532)
at v.executeCommand (vscode-file://vscode-app/d:/a/vsc-print/vsc-print/.vscode-test/vscode-win32-x64-archive-1.68.1/resources/app/out/vs/workbench/workbench.desktop.main.js:1706:3414)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
[main 2022-07-03T13:06:41.294Z] Waiting for extension host with pid 776 to exit.
[main 2022-07-03T13:06:41.330Z] Extension host with pid 776 exited with code: 1, signal: null.
Exit code: 1
Failed
Failed to run tests
Error: Process completed with exit code 1.
The unrecognised commands are registered near the start of the extension's activation event.
export function activate(context: vscode.ExtensionContext) {
let ecmPrint = vscode.workspace.getConfiguration("print", null).editorContextMenuItemPosition,
etmButton = vscode.workspace.getConfiguration("print", null).editorTitleMenuButton,
disposable: vscode.Disposable;
vscode.commands.executeCommand("setContext", "ecmPrint", ecmPrint);
vscode.commands.executeCommand("setContext", "etmButton", etmButton);
context.subscriptions.push(vscode.workspace.onDidChangeConfiguration(checkConfigurationChange));
context.subscriptions.push(vscode.commands.registerCommand("extension.print", printCommand));
context.subscriptions.push(vscode.commands.registerCommand("extension.printFolder", printFolderCommand));
context.subscriptions.push(vscode.commands.registerCommand("extension.test.flags", () => testFlags));
context.subscriptions.push(vscode.commands.registerCommand("extension.test.browserLaunchCommand", PrintSession.getLaunchBrowserCommand));
This suggests that the activation method hasn't been called. Is this something I must do explicitly?
I just noticed this up the top of extension.test.ts
// You can import and use all API from the 'vscode' module
// as well as import your extension to test it
import * as vscode from 'vscode';
// import * as myExtension from '../../extension';
That's not how my tests are written. They don't import the code and call it directly, they assume the extension is installed and active and they use registered commands. Some of these commands were added for no other reason than to allow fine grained unit tests.
The problem I describe in the question is due to the fact that the extension is not installed.
Discovering I can import from the extension doesn't solve all the problems. Some of my tests are strictly speaking integration tests. They need the extension to be installed and active.
To meet that requirement, gulp package rather than gulp build will also produce the VSIX. The only real trick is obtaining the VSIX name to install it in the test environment.
const vsixName = fs.readdirSync(extensionDevelopmentPath)
.filter(p => path.extname(p) === ".vsix")
.sort((a, b) => a < b ? 1 : a > b ? -1 : 0)[0];
const launchArgs = [
path.resolve(__dirname, '../../src/test/test-docs'),
"--install-extension",
vsixName
];
A hybrid approach is possible; some of the registered commands exist only for use by unit tests. These could be junked in favour of direct calls.

Plutus Playground Client cannot run

I am trying to run plutus-playground-client, but I get this error when I run npm run start
[nix-shell:~/dev/plutus/plutus-playground-client]$ npm run start
> plutus-playground-client#1.0.0 start /Users/danicuki/dev/plutus/plutus-playground-client
> npm install && plutus-playground-generate-purs && npm run purs:compile && npm run webpack:server
npm WARN ajv-errors#1.0.1 requires a peer of ajv#>=5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ajv-keywords#3.5.2 requires a peer of ajv#^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN monaco-emacs#0.2.2 requires a peer of monaco-editor#^0.14.0 || ^0.15.0 || ^0.16.0 || ^0.17.0 || ^0.18.0 || ^0.19.3 || ^0.20.0 but none is installed. You must install peer dependencies yourself.
npm WARN plutus-playground-client#1.0.0 No repository field.
audited 752 packages in 3.101s
42 packages are looking for funding
run `npm fund` for details
found 5 vulnerabilities (2 moderate, 3 high)
run `npm audit fix` to fix them, or `npm audit` for details
[Info] Running: (Nothing,PSGenerator {_outputDir = "generated"})
Successfully created your servant API purescript functions!
Please make sure you have purescript-servant-support version 5.0.0 or above installed:
bower i --save purescript-servant-support
The following purescript packages are needed by the generated code:
- plutus-playground-client
- purescript-either
- purescript-foreign-generic
- purescript-maybe
- purescript-ordered-collections
- purescript-profunctor-lenses
- web-common
Successfully created your PureScript modules!
plutus-playground-server: user error (Error evaluating simulation: InterpreterError (CompilationErrors [CompilationError {filename = "\n/private/tmp/web-ghc-work-f7221c0023582e5f/Main.hs", row = 2, column = 1, text = [" error:"," Could not load module \8216Playground.Contract\8217"," It is a member of the hidden package \8216playground-common-0.1.0.0\8217."," You can run \8216:set -package playground-common\8217 to expose it."," (Note: this unloads all the modules in the current scope.)"," Use -v (or `:set -v` in ghci) to see a list of the files searched for."," |","2 | import Playground.Contract"," | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"]},CompilationError {filename = "/private/tmp/web-ghc-work-f7221c0023582e5f/Main.hs", row = 3, column = 1, text = [" error:"," Could not load module \8216Plutus.Contract\8217"," It is a member of the hidden package \8216plutus-contract-0.1.0.0\8217."," You can run \8216:set -package plutus-contract\8217 to expose it."," (Note: this unloads all the modules in the current scope.)"," Use -v (or `:set -v` in ghci) to see a list of the files searched for."," |","3 | import Plutus.Contract"," | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"]},CompilationError {filename = "/private/tmp/web-ghc-work-f7221c0023582e5f/Main.hs", row = 4, column = 1, text = [" error:"," Could not load module \8216PlutusTx.Prelude\8217"," It is a member of the hidden package \8216plutus-tx-0.1.0.0\8217."," You can run \8216:set -package plutus-tx\8217 to expose it."," (Note: this unloads all the modules in the current scope.)"," It is a member of the hidden package \8216plutus-tx-0.1.0.0\8217."," You can run \8216:set -package plutus-tx\8217 to expose it."," (Note: this unloads all the modules in the current scope.)"," Use -v (or `:set -v` in ghci) to see a list of the files searched for."," |","4 | import PlutusTx.Prelude"," | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"]}]))
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! plutus-playground-client#1.0.0 start: `npm install && plutus-playground-generate-purs && npm run purs:compile && npm run webpack:server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the plutus-playground-client#1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/danicuki/.npm/_logs/2021-07-06T16_34_12_339Z-debug.log
How can I solve

Unable to deploy CAP application to Cloud Foundry

I have been developing an application using Cloud Application Programming Model (Node.js), following this tutorial:
https://github.com/SAP-samples/cloud-cap-nodejs-codejam
Unfortunately, I am unable to deploy it to the Cloud Foundry. I also created the app (bookshop) from the tutorial above to check if I get the same error and I did.
The error looks as follows and it occurs when I try to execute npm run build:mta command from exercise 10.
[2020-11-03 15:29:43] INFO executing the "make -f Makefile_20201103152943.mta p=cf mtar= strict=true mode=" command...
[2020-11-03 15:29:45] INFO validating the MTA project
[2020-11-03 15:29:45] ERROR the "mta.yaml" file is not valid:
line 28: the "srv-binding" property set required by the "bookshop-ui" module is not defined
line 34: the "url" property of the "bookshop-ui" module is unresolved; the "srv-binding/srv-url" property is not provided
make: *** [Makefile_20201103152943.mta:26: pre_validate] Error 1
Error: could not build the MTA project: could not execute the "make -f Makefile_20201103152943.mta p=cf mtar= strict=true mode=" command: exit status 2
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bookshop#1.0.0 build:mta: `cds build/all && mbt build -p=cf`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bookshop#1.0.0 build:mta script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Full debug log:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\XXXXX\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build:mta'
1 verbose cli ]
2 info using npm#6.14.8
3 info using node#v12.19.0
4 verbose run-script [ 'prebuild:mta', 'build:mta', 'postbuild:mta' ]
5 info lifecycle bookshop#1.0.0~prebuild:mta: bookshop#1.0.0
6 info lifecycle bookshop#1.0.0~build:mta: bookshop#1.0.0
7 verbose lifecycle bookshop#1.0.0~build:mta: unsafe-perm in lifecycle true
8 verbose lifecycle bookshop#1.0.0~build:mta: PATH: C:\Users\XXXXX\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\XXXXX\Desktop\SAPProject\bookshop\node_modules\.bin;C:\Program Files\Java\jdk1.8.0_172\bin;C:\Program Files\Java\jre1.8.0_172\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\apache-maven-3.6.3\bin;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\PuTTY\;C:\Program Files\OpenJDK12\Bin;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs\;C:\Python\Python37\Scripts\;C:\Python\Python37\;C:\Users\XXXXXX\AppData\Local\Microsoft\WindowsApps;C:\Users\XXXXXX\AppData\Roaming\Cloud Foundry;C:\Users\XXXXX\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\XXXXXX\AppData\Roaming\npm;C:\Users\XXXXXX\AppData\Local\Programs\Git\cmd;
9 verbose lifecycle bookshop#1.0.0~build:mta: CWD: C:\Users\XXXXX\Desktop\SAPProject\bookshop
10 silly lifecycle bookshop#1.0.0~build:mta: Args: [ '/d /s /c', 'cds build/all && mbt build -p=cf' ]
11 silly lifecycle bookshop#1.0.0~build:mta: Returned: code: 1 signal: null
12 info lifecycle bookshop#1.0.0~build:mta: Failed to exec build:mta script
13 verbose stack Error: bookshop#1.0.0 build:mta: `cds build/all && mbt build -p=cf`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\XXXXX\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:314:20)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\XXXXXX\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:314:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid bookshop#1.0.0
15 verbose cwd C:\Users\XXXXX\Desktop\SAPProject\bookshop
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\XXXXX\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build:mta"
18 verbose node v12.19.0
19 verbose npm v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error bookshop#1.0.0 build:mta: `cds build/all && mbt build -p=cf`
22 error Exit status 1
23 error Failed at the bookshop#1.0.0 build:mta script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
mta.yml file - exactly the same as in the tutorial
## Generated mta.yaml based on template version 0.4.0
## appName = bookshop
## language=nodejs; multiTenant=false
## approuter=
_schema-version: '3.1'
ID: bookshop
version: 1.0.0
description: "A simple CAP project."
parameters:
enable-parallel-deployments: true
build-parameters:
before-all:
- builder: custom
commands:
- npm install --production
- npx -p #sap/cds-dk cds build --production
modules:
############## UI MODULE ##########################
- name: bookshop-ui
type: nodejs
path: app
parameters:
memory: 256M
disk-quota: 256M
requires:
- name: srv-binding
group: destinations
properties:
forwardAuthToken: true
strictSSL: true
name: srv-binding
url: ~{srv-url}
# --------------------- SERVER MODULE ------------------------
- name: bookshop-srv
# ------------------------------------------------------------
type: nodejs
path: gen/srv
requires:
# Resources extracted from CAP configuration
- name: bookshop-db
provides:
- name: srv-api # required by consumers of CAP services (e.g. approuter)
properties:
srv-url: ${default-url}
# -------------------- SIDECAR MODULE ------------------------
- name: bookshop-db-deployer
# ------------------------------------------------------------
type: hdb
path: gen/db
parameters:
buildpack: nodejs_buildpack
requires:
# 'hana' and 'xsuaa' resources extracted from CAP configuration
- name: bookshop-db
resources:
# services extracted from CAP configuration
# 'service-plan' can be configured via 'cds.requires.<name>.vcap.plan'
# ------------------------------------------------------------
- name: bookshop-db
# ------------------------------------------------------------
type: com.sap.xs.hdi-container
parameters:
service: hanatrial # or 'hanatrial' on trial landscapes
service-plan: hdi-shared
properties:
hdi-service-name: ${service-name}
Has anyone encountered this issue as well? Any help will be very much appreciated.
The command which you are using to build mta for your project - npm run build:mta internally makes use of SAP Cloud MTA Build Tool, called as MBT in short. MBT makes use of GNU Make internally, as specified here. Try to follow the instructions here to install GNU Make and then try again to build mta for your project using the same command - npm run build:mta. It will build successfully.

I am unable to set path for flutter

when using vim .bash_profile I get this
# Setting PATH for Python 3.8
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.8/bin:${PATH}"
export PATH
# added by Anaconda3 2018.12 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
\eval "$__conda_setup"
else
if [ -f "/anaconda3/etc/profile.d/conda.sh" ]; then
. "/anaconda3/etc/profile.d/conda.sh"
CONDA_CHANGEPS1=false conda activate base
else
\export PATH="/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda init <<<
".bash_profile" 24L, 771C
I want to set path for flutter which should be this line
export PATH="$PATH:/Users/Ahmed/Developer/flutter/bin"