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

node-fetch related deps are not found when built #1152

Open
Zorig opened this issue Aug 15, 2022 · 0 comments
Open

node-fetch related deps are not found when built #1152

Zorig opened this issue Aug 15, 2022 · 0 comments

Comments

@Zorig
Copy link

Zorig commented Aug 15, 2022

Current Behavior

I tried to create a little SDK using tsdx. I built the package and installed it on locally to test on React App. When i run the app it shows warning that:

warn  - ../.../node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/.../node_modules/node-fetch/lib'

../.../node_modules/ws/lib/buffer-util.js
Module not found: Can't resolve 'bufferutil' in '/.../node_modules/ws/lib'

../.../node_modules/ws/lib/validation.js
Module not found: Can't resolve 'utf-8-validate' in '/.../node_modules/ws/lib'

Expected behavior

No warning or module found.

Suggested solution(s)

N/A

Additional context

All the default configuration except isomorphic-unfetch added.

Your environment

  System:
    OS: macOS 12.5
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 5.77 GB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.10.0 - /usr/local/bin/node
    Yarn: 1.22.15 - /usr/local/bin/yarn
    npm: 8.10.0 - /usr/local/bin/npm
    Watchman: 2021.09.13.00 - /usr/local/bin/watchman
  Browsers:
    Brave Browser: 104.1.42.88
    Chrome: 104.0.5112.79
    Firefox: 95.0.2
    Safari: 15.6
  npmPackages:
    typescript: ^4.7.4 => 4.7.4 
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