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

Add Chalk to dependencies list #853

Closed
Arual90 opened this issue Nov 25, 2019 · 3 comments · Fixed by #854
Closed

Add Chalk to dependencies list #853

Arual90 opened this issue Nov 25, 2019 · 3 comments · Fixed by #854

Comments

@Arual90
Copy link

Arual90 commented Nov 25, 2019

Hello,
I have installed the version 3.2.0 of @stoplight/prism-cli

Executing the command prism mock ./swagger.yml -p 8086 i receive the following error:

/Users/me/Documents/app/node_modules/@stoplight/prism-cli/dist/const/options.js:5
    CLI: { index: 0, color: chalk_1.default.bgWhiteBright },
                                            ^

TypeError: Cannot read property 'bgWhiteBright' of undefined
    at Object.<anonymous> (/Users/me/Documents/app/node_modules/@stoplight/prism-cli/dist/const/options.js:5:45)

My app uses chalk version 3.0.0 and i noticed that prism-cli have no chalk dependency defined in the package.json even if it uses it, this way it resolves using the globally installed version 3 which is not the version it needs.

I think adding the line "chalk": "2.4.2" to prism-cli package.json would resolve this little dependency problem

@XVincentX
Copy link
Contributor

XVincentX commented Nov 25, 2019

Minchia — questa non me la aspettavo. Finalmente qualche italiano che usa sta roba @Arual90

Yeah, I think for some reason the dependency has been removed by mistake. I'll open a PR to close this.

@XVincentX
Copy link
Contributor

XVincentX commented Nov 25, 2019

@Arual90 Che versione di node e npm stai usando? Per quanto sia effettivamente un errore, a me su node 12 (yarn e npm) risolvono la dipendenza correttamente.

Intanto, puoi utilizzare il binario precompilato che offriamo nel tab "releases"

@Arual90
Copy link
Author

Arual90 commented Nov 27, 2019

Sto usando Node 10, probabilmente gestisce la cosa diversamente
Grazie per il fix ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants