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

Error when starting development server #22

Open
molgit opened this issue Nov 28, 2023 · 0 comments
Open

Error when starting development server #22

molgit opened this issue Nov 28, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@molgit
Copy link

molgit commented Nov 28, 2023

Describe the bug
When building the React project, the build fails with a module parse error. The error message indicates an issue with handling new.target in the three-stdlib/libs/chevrotain.js file.

To Reproduce
Steps to reproduce the behavior:

  1. Installation with yarn
  2. Run the project using yarn dev
  3. Observe the error during the build process

Error

./node_modules/three-stdlib/libs/chevrotain.js
Module parse failed: 'new.target' can only be used in functions and class static block (12:17)
File was processed with these loaders:
 * ./node_modules/next/dist/compiled/@next/react-refresh-utils/dist/loader.js
 * ./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js
 * ./node_modules/next-translate/lib/cjs/plugin/loader.js
You may need an additional loader to handle the result of these loaders.
| import _wrap_native_super from "@swc/helpers/src/_wrap_native_super.mjs";
| import _create_super from "@swc/helpers/src/_create_super.mjs";
> var _newtarget = new.target;
| var ref = function() {
|     var getRawTag = function getRawTag(value) {

System Info

  • macOS Monterey
  • Node version v20.4.0
  • Npm version 9.8.1

Additional context
This issue persists even after updating all project dependencies.

@molgit molgit added the bug Something isn't working label Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant