gridaco / code

Design to Code Engine
https://grida.co/code
Apache License 2.0
231 stars 30 forks source link

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

Open neokim opened 2 years ago

neokim commented 2 years ago

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):

softmarshmallow commented 2 years ago

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.