Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Using this library in my own project #26

Open
cancerberoSgx opened this issue Sep 29, 2019 · 3 comments
Open

Using this library in my own project #26

cancerberoSgx opened this issue Sep 29, 2019 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers question Further information is requested severity: critical

Comments

@cancerberoSgx
Copy link

I'm trying to use this library in my own project but I fail. BTW I'm trying to use it in nodegui to write tests for it

I tried something like this

docker run --rm -i -v "$PWD":/code --workdir /code ngqt/qode sh test.sh

where test.sh is

rm -rf node_modules package-lock.json yarn.lock build .vscode dist
uname -a 
npm -v
node -v
yarn -v
apt-get install clang-tidy
yarn install --verbose

and ./package.json has "@ng-qt/ng-test": "0.0.3",

but fails with error (see below)

same for

rm -rf node_modules package-lock.json
docker run --rm -i -v "$PWD":/code --workdir /code ngqt/qode yarn add "@ng-qt/ng-test"

or with npm

 rm -rf node_modules/ && docker run --rm -i -v "$PWD":/code --workdir /code ngqt/qode npm i -D "@ng-qt/ng-test"

Also tried the same on a linux host with required dependencies and on macOs (in which will fail because Qtwidgets.so is not found..

Error:

Configuring done
-- Generating done
-- Build files have been written to: /code/node_modules/@ng-qt/ng-test/build
info CMD BUILD
info RUN cmake --build "/code/node_modules/@ng-qt/ng-test/build" --config Release
Scanning dependencies of target NgTest
[ 16%] Building CXX object CMakeFiles/NgTest.dir/src/main.cpp.o
Error running 'clang-tidy': No such file or directory
CMakeFiles/NgTest.dir/build.make:62: recipe for target 'CMakeFiles/NgTest.dir/src/main.cpp.o' failed
make[2]: *** [CMakeFiles/NgTest.dir/src/main.cpp.o] Error 1
CMakeFiles/Makefile2:75: recipe for target 'CMakeFiles/NgTest.dir/all' failed
make[1]: *** [CMakeFiles/NgTest.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
ERR! OMG Process terminated: 2
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
/bin/sh: 1: endif: not found
    at ProcessTermError.ExtendableBuiltin (/opt/yarn-v1.17.3/lib/cli.js:721:66)
    at ProcessTermError.MessageError (/opt/yarn-v1.17.3/lib/cli.js:750:123)
    at new ProcessTermError (/opt/yarn-v1.17.3/lib/cli.js:790:113)
    at ChildProcess.<anonymous> (/opt/yarn-v1.17.3/lib/cli.js:25874:17)
    at ChildProcess.emit (events.js:209:13)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
@marcus-sa
Copy link
Member

marcus-sa commented Sep 29, 2019

Sometimes I forget bash isn't supported on Windows, so the package scripts would have to be refactored for cross platform installations.

It seems weird that bash can't find endif

I'll look into this.

@marcus-sa marcus-sa added bug Something isn't working good first issue Good for newcomers question Further information is requested severity: critical labels Sep 29, 2019
@cancerberoSgx
Copy link
Author

@marcus-sa just a heads up about a previous error that might be causing this: [ 16%] Building CXX object CMakeFiles/NgTest.dir/src/main.cpp.o Error running 'clang-tidy': No such file or directory

How do you run docker ? we should add a working command example in the readme

@marcus-sa
Copy link
Member

@cancerberoSgx yes you're right.
I'll update the documentation tomorrow and get this bug fixed.

@marcus-sa marcus-sa reopened this Sep 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers question Further information is requested severity: critical
Projects
None yet
Development

No branches or pull requests

2 participants