carbon-app / carbon

:black_heart: Create and share beautiful images of your source code
https://carbon.now.sh
MIT License
34.29k stars 1.9k forks source link

Carbon app is not running locally #1483

Open p3n7a90n opened 11 months ago

p3n7a90n commented 11 months ago

Title I am getting the below error while running carbon latest released version(4.9.10) locally.

Screenshots image image

There seems to be some problem with the codemirror.

I tried few suggestions based on the error but none of them worked Any suggestions on how can I resolve this.

daniellutz commented 10 months ago

To install it properly, you can do this:

$ asdf global nodejs latest
$ rm -rf node_modules/
$ yarn install

Before running Carbon, you will need to remove some languages (Nix and Stan) from lib/constants.js file:

...
  {
    name: 'Nim',
    mode: 'nim',
    custom: true,
    highlight: true,
  },
- {
-   name: 'Nix',
-   mode: 'nix',
-   highlight: true,
- },
  {
    name: 'Objective C',
    mode: 'clike',
    mime: 'text/x-objectivec',
    short: 'objectivec',
    highlight: true,
  },
...
  {
    name: 'SQL',
    mode: 'sql',
    highlight: true,
  },
- {
-   name: 'Stan',
-   mode: 'stan',
-   highlight: true,
- },
  {
    name: 'Stylus',
    mode: 'stylus',
    mime: 'stylus',
    highlight: true,
  },
...

Now you can run it by calling the next binary from your node_modules directory:

$ ./node_modules/.bin/next dev
kevin262516 commented 7 months ago

To install it properly, you can do this:

$ asdf global nodejs latest
$ rm -rf node_modules/
$ yarn install

Before running Carbon, you will need to remove some languages (Nix and Stan) from lib/constants.js file:

...
  {
    name: 'Nim',
    mode: 'nim',
    custom: true,
    highlight: true,
  },
- {
-   name: 'Nix',
-   mode: 'nix',
-   highlight: true,
- },
  {
    name: 'Objective C',
    mode: 'clike',
    mime: 'text/x-objectivec',
    short: 'objectivec',
    highlight: true,
  },
...
  {
    name: 'SQL',
    mode: 'sql',
    highlight: true,
  },
- {
-   name: 'Stan',
-   mode: 'stan',
-   highlight: true,
- },
  {
    name: 'Stylus',
    mode: 'stylus',
    mime: 'stylus',
    highlight: true,
  },
...

Now you can run it by calling the next binary from your node_modules directory:

$ ./node_modules/.bin/next dev

I modified the configuration according to the suggestions, but I still get the error

image

image