Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError: Unexpected token 'export' from @stoplight/spectral-core #2850

Open
0thernet opened this issue Jul 18, 2024 · 0 comments
Open

SyntaxError: Unexpected token 'export' from @stoplight/spectral-core #2850

0thernet opened this issue Jul 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@0thernet
Copy link

0thernet commented Jul 18, 2024

Describe the bug
Our CI builds started failing because optic run starting throwing a SyntaxError, seems like due to this issue:
stoplightio/spectral#2656

To Reproduce
Steps to reproduce the behavior:

  1. optic run <openapi.json>
  2. see this error
/Users/benguo/.nvm/versions/node/v18.18.2/lib/node_modules/@useoptic/optic/node_modules/@stoplight/json/index.js:1
export * from './bundle';
^^^^^^

SyntaxError: Unexpected token 'export'
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1178:20)
    at Module._compile (node:internal/modules/cjs/loader:1220:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object.<anonymous> (/Users/benguo/.nvm/versions/node/v18.18.2/lib/node_modules/@useoptic/optic/node_modules/@stoplight/spectral-core/dist/spectral.js:5:16)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)

Node.js v18.18.2

Expected behavior
Just started seeing this error in CI on our end with no changes.
Seems to be this issue, and spectral/stoplight needs to be pinned within Optic.
stoplightio/spectral#2656

@0thernet 0thernet added the bug Something isn't working label Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant