From 8d681610851638b5d4254f9b57d3faf2cbca76c3 Mon Sep 17 00:00:00 2001 From: Romario Date: Mon, 21 Aug 2017 07:53:20 -0500 Subject: [PATCH] Added tips for npm run lint and build errors (#151) (#460) --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c9a9270e2..65e28d010 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,17 @@ This will run the automated build process, start up a webserver, and open the ap 4. Make sure files with names that begin with a dot (.babelrc, .editorconfig, .eslintrc) are copied to the project directory root. This is easy to overlook if you copy this repository manually. 5. Don't run the project from a symbolic link. It may cause issues with file watches. 6. Delete any .eslintrc that you're storing in your user directory. Also, disable any ESLint plugin / custom rules that you've enabled within your editor. These will conflict with the ESLint rules defined in this project. -7. Make sure you don't have NODE_ENV set to production on your machine. If you do then the [development dependencies won't be installed](https://github.com/coryhouse/react-slingshot/issues/400#issuecomment-290497767). Here's [how to check](http://stackoverflow.com/a/27939821/26180). +7. Make sure you don't have NODE_ENV set to production on your machine. If you do then the [development dependencies won't be installed](https://github.com/coryhouse/react-slingshot/issues/400#issuecomment-290497767). Here's [how to check](http://stackoverflow.com/a/27939821/26180). +8. Tip: Things to check if you get an `npm run lint` error or build error: + + * If ESW found an error or warning in your project (e.g. console statement or a missing semi-colon), the lint thread will exit with `Exit status 1`. To fix: + + 1. Change the `npm run lint` script to `"esw webpack.config.* src tools; exit 0"` + 1. Change the `npm run lint:watch` script to `"esw webpack.config.* src tools --watch; exit 0"` + + > Note: Adding `exit 0` will allow the npm scripts to ignore the status 1 and allow ESW to print all warnings and errors. + + * Ensure the `eslint`/`esw` globally installed version matches the version used in the project. This will ensure the `esw` keyword is resolved. ## Technologies Slingshot offers a rich development experience using the following technologies: