You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to start mock server locally, I get an error. No matter what src for OpenAPI spec source I use.
Context
It does not start mock server
Current Behavior
The command crashes
Throws an error
[3:34:15 PM] › [CLI] ✖ fatal Error downloading https://raw.githack.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore-expanded.yaml
The "emitter" argument must be an instance of EventEmitter or EventTarget. Received an instance of AbortSignal
prism mock <document>
Start a mock server with the given document file
Positionals:
document Path to a document file. Can be both a file or a fetchable resource
on the web. [string] [required]
Options:
--version Show version number [boolean]
--help Show help [boolean]
-p, --port Port that Prism will run on.
[number] [required] [default: 4010]
-h, --host Host that Prism will listen to.
[string] [required] [default: "127.0.0.1"]
--cors Enables CORS headers. [boolean] [default: true]
-m, --multiprocess Forks the http server from the CLI for faster log
processing. [boolean] [default: false]
--errors Specifies whether request/response violations marked as
errors will produce an error response
[boolean] [required] [default: false]
-v, --verboseLevel Turns on verbose logging.
[required] [choices: "trace", "debug", "info", "warn", "error", "fatal",
"silent"] [default: "info"]
-d, --dynamic Dynamically generate examples. [boolean] [default: false]
{
stack: 'ResolverError: Error downloading https://raw.githack.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore-expanded.yaml \n' +
'The "emitter" argument must be an instance of EventEmitter or EventTarget. Received an instance of AbortSignal\n' +
' at download (/Users/viktorbezrdonyi/.nvm/versions/node/v18.15.0/lib/node_modules/@stoplight/prism-cli/node_modules/@stoplight/json-schema-ref-parser/lib/resolvers/http.js:175:11)\n' +
' at processTicksAndRejections (node:internal/process/task_queues:95:5)',
code: 'ERESOLVER',
message: 'Error downloading https://raw.githack.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore-expanded.yaml \n' +
'The "emitter" argument must be an instance of EventEmitter or EventTarget. Received an instance of AbortSignal',
source: 'https://raw.githack.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore-expanded.yaml',
path: null,
toJSON: [Function: toJSON],
ioErrorCode: 'ERR_INVALID_ARG_TYPE',
name: 'ResolverError',
toString: [Function: toString]
}
When I try to start mock server locally, I get an error. No matter what src for OpenAPI spec source I use.
Context
It does not start mock server
Current Behavior
The command crashes
Throws an error
Expected Behavior
The mock server starts
Steps to Reproduce
Environment
The text was updated successfully, but these errors were encountered: