-
Notifications
You must be signed in to change notification settings - Fork 338
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
mock fails with TypeError: Cannot read properties of undefined (reading 'isMaster')
#2138
Comments
I have the same problem when I try to launch prism in a github workflow
Prism is started with Docker-Compose :
But I don't encounter the problem in local :
|
Hey team! Please add your planning poker estimate with Zenhub @brendarearden @daniel-white @EdVinyard @fcasad |
I was seeing this issue with the latest release of the |
I confirm that the problem disappears by using the image |
i can also confirm that i had the same issues when using |
Hello all! I have the reported issue with 4.10.4, but it is sporadic :( I have read you use |
Hi everyone, |
Context
You cannot start
mock
server commandCurrent Behavior
Running
mock
command on the prim cli using either directly NodeJS source code or Dockerfile throws the following error:Expected Behavior
I would expect the command to work successfully
Possible Workaround/Solution
The problem seems to be that when compiling prism using
yarn build
command, the output of the filepackages/cli/dist/util/createServer.js
regarding thenode:cluster
module seems to be wrong. The related lines are:L7:
const node_cluster_1 = require("node:cluster");
L27:
if (node_cluster_1.default.isMaster) {
CAUSE
The
default
attribute onnode_cluster_1
is undefined leading to theTypeError
mentioned above. As far as I know.default
was never an attribute of the node cluster module. So I guess this is due to some compilation or types error of the moduleSteps to Reproduce
yarn && yarn build
node . mock <api-spec-file>
Exactly the same with Dockerfile using latest
stoplight/prism
imageEnvironment
stoplight/prism:4
The text was updated successfully, but these errors were encountered: