yume-chan / ya-webadb

ADB in your browser
https://tangoapp.dev/
MIT License
2.32k stars 304 forks source link

Unable to build in webpack #638

Open jamesikanos opened 6 months ago

jamesikanos commented 6 months ago

Issue Checklist

Library version

0.0.23

Environment

Node v12.12.0

Device

Linux

Describe the bug

I'm trying to include the library in my own project, but when I try to build I receive these webpack errors:

./node_modules/@yume-chan/stream-extra/esm/push-readable.js - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/tools/babel/webpack-loader.js): TypeError: /workspaces/site_survey_results/node_modules/@yume-chan/stream-extra/esm/push-readable.js: Cannot read properties of null (reading 'type')

./node_modules/@yume-chan/stream-extra/esm/wrap-readable.js - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/tools/babel/webpack-loader.js): TypeError: /workspaces/site_survey_results/node_modules/@yume-chan/stream-extra/esm/wrap-readable.js: Cannot read properties of null (reading 'type')

Do I need to change my TSConfig to support this?

I'm adding this to an Angular 17 app.

Steps to reproduce

  1. Create an Angular App
  2. Yarn add the required dependencies
  3. Try to build
yume-chan commented 6 months ago

Node v12.12.0

Too old. We only support LTS and stable versions of Node.js.

./node_modules/@yume-chan/stream-extra/esm/push-readable.js - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/tools/babel/webpack-loader.js): TypeError: /workspaces/site_survey_results/node_modules/@yume-chan/stream-extra/esm/push-readable.js: Cannot read properties of null (reading 'type')

I also don't understand why it need to evaluate that at build time.

jamesikanos commented 6 months ago

Sorry, that was a typo:

I'm on v20.12.0

yume-chan commented 6 months ago

Can you share a complete repro? I'm not familiar with Angular.

jamesikanos commented 6 months ago

I'll get something new to you within a few days. It's an internal project so I'll make a separate sample.

yume-chan commented 6 months ago

It might not work with Angular anyway: https://github.com/yume-chan/ya-webadb/issues/630#issuecomment-2032516900