Gatsby compile error


#1

Hello,
I’m trying gatsby-starter on Windows 10
I find the following error:

 $gatsby develop
error We tried an error while trying to load your site's gatsby-config. Please fix the error and try again.


   Error: C: \ Users \ *** \ Documents \ gatsby_local \ src \ utils \ rss \ generate-feed.js: 68
                   ... feed,
                   ^^^
   SyntaxError: Unexpected token ...

If I replace with “… feed” with “feed” it works correctly.

I have not met any other errors.


#2

Sounds like your node version is too low - what version are you on?


#3

Node Version is v6.9.2, should i upgrade?


#4

Yep, the feature that’s used is Object Spread which requires a node minimum of 8.6.0


#5

Well I tried to install node 10.15 without success, I noticed after that ghost does not support it. I installed version 8.16 but nothing, not even with 8.6.

× Starting Ghost
A GhostError occurred.

Message: Ghost process exited with code: 0

Debug Information:
     OS: Microsoft Windows, v10.0.17134
     Node Version: vX.X.X
     Ghost-CLI Version: 1.9.9
     Environment: development
     Command: 'ghost start'

The only one that works is version 6.x, ghost starts correctly. But so I do not solve the gatsby mistake


#6

You can see the recommended Node version for Ghost is 8.x :point_right: https://docs.ghost.org/faq/node-versions/

How did you install Node? Are you using nvm?

And how did you install Ghost? Did you run ghost install local?


#7

I’m on Win10

I’ve downloaded node from here -> https://nodejs.org/en/download/releases/ -> msi version

Yes i’m using ghost-install-local


#8

Hello, I still can not install ghost locally with node greater than version 6 on WIN 10.

Clearly with version 6 I’m limited for other things like gatsby. I would like to update, how to solve?

ghost start
√ Checking current folder permissions
√ Validating config
√ Checking memory availability
× Starting Ghost
A GhostError occurred.

Message: Ghost process exited with code: 0

Debug Information:
     OS: Microsoft Windows, v10.0.17134
     Node Version: v8.6.0
     Ghost-CLI Version: 1.9.9
     Environment: development
     Command: 'ghost start'

Additional log info available in: C: \ Users \ ****\ .ghost \ logs \ ghost-cli-debug-2019-01-19T13_35_37_456Z.log

Try running to check your system for known issues.

#9

What do your logs say? And did you try running ghost doctor?


#10
Debug Information:
    OS: Microsoft Windows, v10.0.17134
    Node Version: v8.15.0
    Ghost-CLI Version: 1.9.9
    Environment: development
    Command: 'ghost start'
Message: Ghost process exited with code: 0
Stack: Error: Ghost process exited with code: 0
    at ChildProcess.cp.on (C:\Users\****\AppData\Roaming\npm\node_modules\ghost-cli\lib\utils\local-process.js:56:24)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
 ghost doctor
Found a development config but not a production config, running in development mode instead
√ Checking system Node.js version
√ Checking current folder permissions
√ Validating config
√ Checking memory availability

Nothing else, any idea ?


closed #11

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.