code icon indicating copy to clipboard operation
code copied to clipboard

Error during running on local server - Module parse failed: Unexpected token (49:7)

Open neokim opened this issue 3 years ago • 1 comments

Describe the bug Fails to start the application on a local server showing following error.

> yarn editor
yarn run v1.22.18
$ yarn workspace editor dev
$ next dev -p 6626
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
ready - started server on http://localhost:6626
info  - Using external babel configuration from /Users/neokim/Repositories/Grida/designto-code/editor/babel.config.js
event - compiled successfully
event - build page: /next/dist/pages/_error
wait  - compiling...
event - compiled successfully
event - build page: /
wait  - compiling...
error - ../externals/reflect-core/packages/reflect-core/lib/cg/filters/blend-mode.ts 49:7
Module parse failed: Unexpected token (49:7)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|  * ```
|  */
> export enum BlendMode {
|     Normal = "Normal",
|     Darken = "Darken",

To Reproduce

  1. git clone https://github.com/gridaco/designto-code.git
  2. cd designto-code
  3. yarn
  4. yarn checkout:all
  5. yarn editor
  6. Show error

Screenshots In the browser image

Desktop (please complete the following information):

  • OS: macOS v12.3.1
  • Node: v14.19.1

neokim avatar Apr 10 '22 06:04 neokim

This can happen with overridden yarn.lock file. reset the yarn.lock file, run yarn again. it will work fine, Still this should be prevented even from removing yarn.lock file, so I'll leave this issue open.

TL;DR - reset yarn.lock (force pull from remote), yarn again.

softmarshmallow avatar Apr 10 '22 07:04 softmarshmallow