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

npm start Produces Error #7307

Open
samhinshaw opened this issue Dec 11, 2024 · 0 comments
Open

npm start Produces Error #7307

samhinshaw opened this issue Dec 11, 2024 · 0 comments
Labels
bug something broken

Comments

@samhinshaw
Copy link
Contributor

Running npm start on master produces an error: "module is not defined".

Steps to Reproduce

  1. Run npm start

Expected Behavior

I started writing up this ticket because I thought this broke the test dashboard. However, it appears this console error is simply erroneous.

Actual Behavior

The test dashboard actually does not appear to break, despite the console error.

Additional Details

The CommonJS export syntax in //devtools/test_dashboard/devtools.js is at fault. It appears that ESBuild does not strip this out on build. To fix this, we could:

  1. Remove the module.exports = Tabs line if this export is not needed elsewhere.
  2. Create another file (e.g. index.js), import the devtools from there const Tabs = require('./tabs');, and point ESBuild at that.
Image
@samhinshaw samhinshaw changed the title Developer Script Produces Error npm start Produces Error Dec 11, 2024
@samhinshaw samhinshaw added the bug something broken label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

1 participant