Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Dappeteer 4.0.1 broken dependency #228

@Lykhoyda

Description

@Lykhoyda

Describe the bug
When we use dappeteer as npm package, import from test folder to src will break because dev dependency is not installed (expected). Therefore importing "export const EXAMPLE_WEBSITE = "http://example.org";" to the src folder from test/ will fail due to uninstalled web3 dependency. As a file will be resolved entirely and not just the export part.

To Reproduce
install dappeteer v4.0.1 and call method "initSnapEnv()"

Logs

Cannot find module 'web3' from '../../node_modules/@chainsafe/dappeteer/dist/test/constant.js'

Expected behavior
We shouldn't use a test folder when dappeteer is used as a package

System:

  • OS: Ventura 13.01
  • NodeJs version 16
  • dAppeteer version 4.0.1
  • testing framework jest
  • testing framework version 26

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done/Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions