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

Dev dependancy issue with bytebuffer while implementing NextJS v13.4 App/ Directory #8396

Closed
Seranged opened this issue May 6, 2023 · 3 comments · Fixed by #8421
Closed
Labels
bug Something isn't working as expected

Comments

@Seranged
Copy link

Seranged commented May 6, 2023

Describe the bug
Recently have been upgrading to NextJS's new App/ directory router with v13.4
While utilizing the Pages directory, this was not an issue.

NextJS v13.4 (Page directory) (No Issue)
NextJS v13.1 (Page directory) (No Issue)
NextJS v13.4 (App directory) (Issue)
NextJS v13.1 (App directory) (Issue)

Info:

  • Suite Version: web
  • Browser: Chrome/Version 112.0.5615.137 (Official Build) (arm64)
  • OS: macOS Monterey, V12.5.1

Reproduction

I have recreated the issue in this bootstrap repo branch:
https://github.com/Seranged/EVM-FE-Bootstrap/tree/trezor-nextjs-issue-reproduction

  1. yarn install
  2. yarn dev
  3. terminal says:

warn ./node_modules/bytebuffer/dist/bytebuffer-node.js
Module not found: Can't resolve 'memcpy' in '/GitHub/EVM-bootstrap/node_modules/bytebuffer/dist'

Import trace for requested module:
./node_modules/bytebuffer/dist/bytebuffer-node.js
./node_modules/@trezor/transport/lib/lowlevel/receive.js
./node_modules/@trezor/transport/lib/bridge/v2.js
./node_modules/@trezor/transport/lib/index.js
./node_modules/@trezor/connect/lib/data/config.js
./node_modules/@trezor/connect-web/lib/index.js
./src/app/layout.tsx

Expected behavior
There shouldn't be a dev dependency issue, I think it's to do with how the Trezor dev dependencies are working in combination with the new NextJS App directory, as the exact same repo but utilizing the Page/ directory works perfectly fine.

Screenshots
image

@Seranged Seranged added the bug Something isn't working as expected label May 6, 2023
@sime
Copy link
Member

sime commented May 9, 2023

Looks related to #7944

@Seranged
Copy link
Author

Seranged commented May 9, 2023

@sime

Tried replicating your suggestion in #7944

  1. Checked that memcpy or bytesbuffer is not in package.json
  2. Ran rm -rf node_modules
  3. Ran yarn install
  4. Ran yarn dev
  5. Issue still persists (screenshot)

This issue is also associated with "@trezor/connect-web": "^9.0.8" and not @trezor/connect

image

@Seranged
Copy link
Author

Seranged commented May 9, 2023

Furthermore, similarly to #7944,

Additional context I received an additional warning regarding [encoding](https://github.com/andris9/encoding#readme) dependency missing. Was able to install which resolved the warning

Which works fine when installed as its own dependency inside this front-end repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants