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

Print a readable error instead of dumping the whole error object to the console. #950

Merged
merged 2 commits into from
Mar 7, 2017

Conversation

mcampa
Copy link
Contributor

@mcampa mcampa commented Mar 6, 2017

What?

Print a readable error when a npm module is missing, or any other webpack error, instead of dumping the whole error object to the console.

Example:

Module not found: Error: Cannot resolve module 'lazysizes' in /Users/mario.campa/stencil/assets/js/theme resolve module lazysizes in /Users/mario.campa/stencil/assets/js/theme
  looking for modules in /Users/mario.campa/stencil/node_modules
    /Users/mario.campa/stencil/node_modules/lazysizes doesn't exist (module as directory)
    resolve 'file' lazysizes in /Users/mario.campa/stencil/node_modules
      resolve file
        /Users/mario.campa/stencil/node_modules/lazysizes doesn't exist
        /Users/mario.campa/stencil/node_modules/lazysizes.webpack.js doesn't exist
        /Users/mario.campa/stencil/node_modules/lazysizes.web.js doesn't exist
        /Users/mario.campa/stencil/node_modules/lazysizes.js doesn't exist
        /Users/mario.campa/stencil/node_modules/lazysizes.json doesn't exist

@bigcommerce/stencil-team

@mcampa mcampa merged commit 06fa828 into bigcommerce:master Mar 7, 2017
@mcampa mcampa deleted the missing-module-error branch March 7, 2017 01:12
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 this pull request may close these issues.

None yet

2 participants