marceloavf / marceloavf/marceloformentao.dev
Error when starting development server
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 40
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
**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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with yarn dev and inspect three-stdlib/libs/chevrotain.js at the reported new.target line. Review how the Next.js SWC and next-translate loaders process this dependency; done means the development server builds without the module parse error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nextjs, react, three.js
- Domain
- build-system, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100