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

🐞[cli]: throws err when no args passed. #861

Closed
pranshuchittora opened this issue Apr 26, 2019 · 4 comments · Fixed by #862
Closed

🐞[cli]: throws err when no args passed. #861

pranshuchittora opened this issue Apr 26, 2019 · 4 comments · Fixed by #862

Comments

@pranshuchittora
Copy link
Member

Describe the bug

CLI throws an error when no args passed. Occurs only if webpack is not installed.

Screenshot from 2019-04-26 11-20-44

What is the current behaviour?
Throws an error.
To Reproduce
Steps to reproduce the behaviour:

  1. Create a new folder.
  2. npm init -y
  3. npm i webpack-cli
  4. ./node_modules/webpack-cli/bin/cli.js

Expected behavior
Must provide some useful information in order to resolve the issue, instead of showing err logs.

Please paste the results of webpack-cli info here, and mention other relevant information
System:
OS: Linux 4.18 Ubuntu 18.10 (Cosmic Cuttlefish)
CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Binaries:
Node: 10.12.0 - ~/.nvm/versions/node/v10.12.0/bin/node
Yarn: 1.12.3 - /usr/bin/yarn
npm: 6.5.0 - ~/.nvm/versions/node/v10.12.0/bin/npm
Browsers:
Chrome: 73.0.3683.103
Firefox: 66.0.3
npmPackages:
webpack: ^4.30.0 => 4.30.0
webpack-cli: ^3.3.1 => 3.3.1
npmGlobalPackages:
webpack-cli: 3.3.1
webpack: 4.27.1

@ematipico
Copy link
Contributor

Have you installed webpack?

@pranshuchittora
Copy link
Member Author

No I haven't installed webpack.
This error occurs when webpack is not installed and no args passed to the CLI. #862

@evenstensberg
Copy link
Member

This is a no fix in my opinion

@pranshuchittora
Copy link
Member Author

pranshuchittora commented May 4, 2019

@evenstensberg
The fix for this is to output a proper message(steps/warning) in order to channelise the user for a successful run.

Fix #862

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.

3 participants