HoudiniGraphql / houdini

The disappearing GraphQL framework
http://www.houdinigraphql.com
MIT License
917 stars 99 forks source link

Unexpected token * #103

Closed TheBeachMaster closed 3 years ago

TheBeachMaster commented 3 years ago

Getting started with Houdini on Sapper throws the following error

Unexpected token *

Steps:

In an existing sapper project

  1. yarn add -D houdini houdini-preprocess
  2. npx houdini init

Result:

Unexpected token *

System Info

  System:
    OS: macOS 11.4
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 1.54 GB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  npmPackages:
    @babel/core: ^7.13.16 => 7.13.16 
    @babel/plugin-syntax-dynamic-import: ^7.8.3 => 7.8.3 
    @babel/plugin-transform-runtime: ^7.13.15 => 7.13.15 
    @babel/preset-env: ^7.13.15 => 7.13.15 
    @babel/runtime: ^7.13.17 => 7.13.17 
    @rollup/plugin-babel: ^5.3.0 => 5.3.0 
    @rollup/plugin-commonjs: ^18.0.0 => 18.0.0 
    @rollup/plugin-node-resolve: ^11.2.1 => 11.2.1 
    @rollup/plugin-replace: ^2.4.2 => 2.4.2 
    @rollup/plugin-url: ^6.0.0 => 6.0.0 
    compression: ^1.7.4 => 1.7.4 
    houdini: ^0.7.1 => 0.7.1 
    houdini-preprocess: ^0.7.1 => 0.7.1 
    npm-check-updates: ^11.5.1 => 11.5.1 
    polka: next => 1.0.0-next.14 
    qrcode: ^1.4.4 => 1.4.4 
    qrcode-svg: ^1.1.0 => 1.1.0 
    rollup: ^2.45.2 => 2.45.2 
    rollup-plugin-svelte: ^7.1.0 => 7.1.0 
    rollup-plugin-terser: ^7.0.2 => 7.0.2 
    sapper: ^0.29.1 => 0.29.1 
    sirv: ^1.0.11 => 1.0.11 
    svelte: ^3.37.0 => 3.37.0 
    svelte-qrcode: ^1.0.0 => 1.0.0 
AlecAivazis commented 3 years ago

Hey @TheBeachMaster - sorry you ran into this.

Is there a stack trace associated with the error?

TheBeachMaster commented 3 years ago

Hello @AlecAivazis unfortunately there's none

AlecAivazis commented 3 years ago

Hm, okay that makes this kind of tricky to debug. Does it happen as part of the init command?

Have you by chance joined the svelte discord? If so, mind reaching out there? My username on that server is @AlecAivazis. I'd like to figure out what's going and will probably need some screenshots for added info. Also, we'll probably need to tweak some things in the command-line tool you pulled from npm which could get tricky to walk through over github issues

TheBeachMaster commented 3 years ago

Yes I am on Discord - same Username- , the error comes up when running any Houdini command

# [REDACTED] @ [REDACTED]-MacBook-Pro in ~/[REDACTED]/frontend on git:master x [22:11:47] 
$ DEBUG=* npx houdini init
Unexpected token *

# [REDACTED] @ [REDACTED]-MacBook-Pro in ~/[REDACTED]/frontend on git:master x [22:11:49] C:1
$ npx houdini generate
Unexpected token *

# [REDACTED] @ [REDACTED]-MacBook-Pro in ~/[REDACTED]/frontend on git:master x [22:14:20] C:1
$ npx houdini         
Unexpected token *

# [REDACTED] @ [REDACTED]-MacBook-Pro in ~/[REDACTED]/frontend on git:master x [22:14:30] C:1
TheBeachMaster commented 3 years ago

Maybe additional info , this is node 14.1

TheBeachMaster commented 3 years ago

Resolved by setting Node Version to 15.8.0 as advised