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

Cannot build/run tests after installing v3 #293

Open
Spriz opened this issue Sep 5, 2023 · 0 comments
Open

Cannot build/run tests after installing v3 #293

Spriz opened this issue Sep 5, 2023 · 0 comments

Comments

@Spriz
Copy link

Spriz commented Sep 5, 2023

Describe the bug
After installing

I get the following output when trying to run our Angular test suite

$ npm run test:ci
> [email protected] test:ci /builds/apacta/apacta-2/packages/timereg
> npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
> [email protected] test /builds/apacta/apacta-2/packages/timereg
> npx ng test "--no-watch" "--no-progress" "--browsers=ChromeHeadlessCI"
Processing legacy "View Engine" libraries:
- @ngxs/store/internals [es2015/esm2015] (git+https://github.com/ngxs/store.git)
- @ionic-native/core [module/esm5] (git+https://github.com/ionic-team/ionic-native.git)
- @ngxs/store [es2015/esm2015] (git+https://github.com/ngxs/store.git)
- ng-intercom [es2015/esm2015] (git+https://github.com/CaliStyle/ng-intercom.git)
- ion2-calendar [main/commonjs] (git+https://github.com/HsuanXyz/ion2-calendar.git)
- ngx-file-drop [es2015/esm2015] (git+https://github.com/georgipeltekov/ngx-file-drop.git)
- @ngxs/store/operators [es2015/esm2015] (git+https://github.com/ngxs/store.git)
- @ngxs/devtools-plugin [es2015/esm2015] (git+https://github.com/ngxs/store.git)
- @ngxs/form-plugin [es2015/esm2015] (git+https://github.com/ngxs/store.git)
- ionic-selectable [es2015/esm2015] (git+https://github.com/eakoriakin/ionic-selectable.git)
- angular2-signaturepad [main/commonjs] (git+https://github.com/wulfsolter/angular2-signaturepad.git)
- @ionic-native/media-capture [module/esm5] (git+https://github.com/ionic-team/ionic-native.git)
Encourage the library authors to publish an Ivy distribution.
./node_modules/@capacitor-community/barcode-scanner/dist/esm/web.js:54:40-53 - Error: export 'BarcodeFormat' (imported as 'BarcodeFormat') was not found in '@zxing/browser' (possible exports: BrowserAztecCodeReader, BrowserCodeReader, BrowserCodeSvgWriter, BrowserDatamatrixCodeReader, BrowserMultiFormatOneDReader, BrowserMultiFormatReader, BrowserPDF417Reader, BrowserQRCodeReader, BrowserQRCodeSvgWriter, HTMLCanvasElementLuminanceSource)
./node_modules/@zxing/browser/esm/common/HTMLCanvasElementLuminanceSource.js:16:0-101 - Error: Module not found: Error: Can't resolve '@zxing/library' in '/builds/apacta/apacta-2/packages/timereg/node_modules/@zxing/browser/esm/common'
./node_modules/@zxing/browser/esm/index.js:3:0-47 - Error: Module not found: Error: Can't resolve '@zxing/library' in '/builds/apacta/apacta-2/packages/timereg/node_modules/@zxing/browser/esm'
./node_modules/@zxing/browser/esm/readers/BrowserAztecCodeReader.js:16:0-49 - Error: Module not found: Error: Can't resolve '@zxing/library' in '/builds/apacta/apacta-2/packages/timereg/node_modules/@zxing/browser/esm/readers'
./node_modules/@zxing/browser/esm/readers/BrowserCodeReader.js:173:0-153 - Error: Module not found: Error: Can't resolve '@zxing/library' in '/builds/apacta/apacta-2/packages/timereg/node_modules/@zxing/browser/esm/readers'
./node_modules/@zxing/browser/esm/readers/BrowserDatamatrixCodeReader.js:16:0-50 - Error: Module not found: Error: Can't resolve '@zxing/library' in '/builds/apacta/apacta-2/packages/timereg/node_modules/@zxing/browser/esm/readers'
./node_modules/@zxing/browser/esm/readers/BrowserMultiFormatOneDReader.js:16:0-55 - Error: Module not found: Error: Can't resolve '@zxing/library' in '/builds/apacta/apacta-2/packages/timereg/node_modules/@zxing/browser/esm/readers'
./node_modules/@zxing/browser/esm/readers/BrowserMultiFormatReader.js:16:0-68 - Error: Module not found: Error: Can't resolve '@zxing/library' in '/builds/apacta/apacta-2/packages/timereg/node_modules/@zxing/browser/esm/readers'
./node_modules/@zxing/browser/esm/readers/BrowserPDF417Reader.js:16:0-46 - Error: Module not found: Error: Can't resolve '@zxing/library' in '/builds/apacta/apacta-2/packages/timereg/node_modules/@zxing/browser/esm/readers'
./node_modules/@zxing/browser/esm/readers/BrowserQRCodeReader.js:16:0-46 - Error: Module not found: Error: Can't resolve '@zxing/library' in '/builds/apacta/apacta-2/packages/timereg/node_modules/@zxing/browser/esm/readers'
./node_modules/@zxing/browser/esm/writers/BrowserCodeSvgWriter.js:1:0-148 - Error: Module not found: Error: Can't resolve '@zxing/library' in '/builds/apacta/apacta-2/packages/timereg/node_modules/@zxing/browser/esm/writers'
./node_modules/@zxing/browser/esm/writers/BrowserQRCodeSvgWriter.js:1:0-148 - Error: Module not found: Error: Can't resolve '@zxing/library' in '/builds/apacta/apacta-2/packages/timereg/node_modules/@zxing/browser/esm/writers'
05 09 2023 07:10:21.658:INFO [karma-server]: Karma v6.4.0 server started at http://localhost:9876/
05 09 2023 07:10:21.659:INFO [launcher]: Launching browsers ChromeHeadlessCI with concurrency unlimited
05 09 2023 07:10:21.661:INFO [launcher]: Starting browser ChromeHeadless
05 09 2023 07:10:21.890:INFO [Chrome Headless 101.0.4951.64 (Linux x86_64)]: Connected on socket CRUxyudJTVTZON8iAAAB with id 14698824
05 09 2023 07:10:21.904:WARN [web-server]: 404: /_karma_webpack_/main.js
TOTAL: 0 SUCCESS
Chrome Headless 101.0.4951.64 (Linux x86_64): Executed 0 of 0 SUCCESS (0 secs / 0 secs)
TOTAL: 0 SUCCESS
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test: `npx ng test "--no-watch" "--no-progress" "--browsers=ChromeHeadlessCI"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] test 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!     /root/.npm/_logs/2023-09-05T07_10_22_245Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test:ci: `npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] test:ci 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!     /root/.npm/_logs/2023-09-05T07_10_22_256Z-debug.log
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit code 1

To Reproduce
Unfortunately I'm unsure if it's our version of Angular, Ionic, Capacitor, Typescript or configuration that causes this - I'm not able to reproduce it locally on my Windows or Linux machine but using macOS it does indeed fail. (maybe something related to capacitor only syncing to iOS on Mac? 🤔 )

Expected behavior
That the build doesn't fail

Screenshots
N/A

Version

 "@capacitor-community/barcode-scanner": "^3.0.3",
 "@capacitor/android": "^4.0.0",
 "@capacitor/ios": "^4.0.0",
 "@angular/core": "~13.3.11"

Desktop (please complete the following information):

  • OS: Ubuntu 22.04 LTS + MacOS 12.5
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

N/A

Additional context
I'm pretty sure this is a combination of settings/versions gone bad on our end - but maybe someone can spot it instantly or point us somewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant