-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Tip: Things to check if you get an npm run lint error or build error #151
Comments
@SenLi325 Wow, great stuff. Thanks for pulling all this together! This is really comprehensive and helpful! 👍 |
Update on First check list. |
This is probably obvious to everyone except me, but it took me a bit to figure out that step 2 occurs in the package.json. That fixed my issue, so thanks! |
I've had this issue for weeks. Now fixed (on the react-redux pluralight course) It was the path issues with eslint watch. I made sure i installed eslint watch 2.1.14 both globally and locally |
Is anyone still having issues here or are we OK to close this? Also thanks again to @Evilcat325 for pulling this together. |
I'm fine with closing, but would suggest copying any info here to here: https://github.com/coryhouse/react-slingshot#having-issues-try-these-things-first |
@Evilcat325, would you be willing to throw up a PR to update the docs section https://github.com/coryhouse/react-slingshot/blob/master/README.md#having-issues-try-these-things-first ? |
Added help wanted label for someone to transfer this to documentation. This would also be a good-first-pr, but we didn't have a label for that. |
@coryhouse, can you create a good first PR label? I don't think we have access to create labels. |
Ah! Great idea. Done. 👍 |
Eager to get my first PR in 😃. Is this info still valid, since we are no longer using a |
Great to hear @romarioraffington! Correct, you can ignore the .eslintrc tip since that's in package.json now. |
How does this look @coryhouse ?
|
Hi @romarioraffington - Thanks! I corrected a minor typo by editing your comment. Let's omit the first bullet since that code is already included in the project. but otherwise looks great. Thanks! |
Closing since @romarioraffington added! 👍 |
* removed react-router form package.json & installed react-router-dom. * completed index.src refactor. * re-implemented App.js * added notes to import changes & App.js * modified middleware array @ store/configureStore.js * updated yarn.lock file with fresh `yarn` command. * updated master branch. * upgraded react-hot-reloader to @3.0.0-beta.6 * removed extra "document.getElementById(app) from Root.js * moved react-router-redux to regular "dependencies" from "dev-dependencies" * cleaned Root.propTypes. * cleaned Root.js & App.js per @oshalygin feedback. * replaced .gitignore comment. * removed react-router form package.json & installed react-router-dom. * completed index.src refactor. * re-implemented App.js * added notes to import changes & App.js * Update FAQ.md fixed header on FAQ page * Update README.md fixed a few headers improperly declared * modified middleware array @ store/configureStore.js * Add react hot loader 3 (#392) - This commit wires up react-hot-loader 3 to be used in the application. There are numerous benefits to the latest release, all of which can be seen at https://github.com/gaearon/react-hot-loader - Note that the specific implementation around wrapping in a Root component is part of how react-hot-loader 3 needs to be configured. - Note that the package is brought in as a dependency, not a dev dependency because of how it is switched at runtime or not. - More information on the migration can be viewed at: https://github.com/gaearon/react-hot-loader/tree/master/docs\#migration-to-30 Related: #216 * Updated react-hot-loader to correct package version. (#401) * Add item to check if issues * updated yarn.lock file with fresh `yarn` command. * Fix formatting (#403) * updated master branch. * upgraded react-hot-reloader to @3.0.0-beta.6 * removed extra "document.getElementById(app) from Root.js * moved react-router-redux to regular "dependencies" from "dev-dependencies" * cleaned Root.js & App.js per @oshalygin feedback. * replaced .gitignore comment. * clean index.js * Add CONTRIBUTE.md (#431) * Add * Updated yarn lock using upgrade * Rename * Update * Upgrade to webpack 3 * Update yarn lock * Update snapshot * Set prod env when analyzing bundle * Add jest-cli as dependency * Revert PR #450 (#451) Removed change that removed additional dashes in npm test scripts in favor of adding jest-cli as a devDep. This commit instead focusses on issue 2 from #449 where setupPrompts.js had a bug that caused start script to fail. * Issue #449 fix (#450) * Issue #449 fix Issue 1: Removed extra dashes located in the package.json test scripts that cause start script to fail. Issue 2: Removed escape characters found in setupPrompts.js which cause linting to fail, thus breaking start script. * Jest fix Re-added previously removed dashes from test scripts in package.json that caused start script to fail. Instead, @coryhouse added in jest-cli as a dev-dep which resolves the issue. * Enhance babel env config to transpile for IE9+ (#452) * Fix for jest handling of static assets when running tests. See: (#457) jestjs/jest#2663 (comment) * Added tips for npm run lint and build errors (#151) (#460) * pushing changes from upstream fetch. * updated from rebase. * modified package versions in package.json & created new build. * update package.json * fixed conflicts with upstream master. * cleaned up PropTypes validations - react-router-redux throwing PropTypes error. * comment spell check & de-console on Root.js
This lint thing does not work for me on Windows... Even if I applied all the suggestions. I just ignore it for the time being... In general this is why it is difficult for me to start with all these tools: versioning nightmare + completely unreadable error messages... We are still in medieval when it comes to building software! :) esw webpack.config.* src buildScripts --color; exit 0 |
Build and Link 16x Fails? after all updates, 18x and 20x are good, why? 4_Install dependencies.txt |
I am opening this issue as I also caught up in the npm run lint error issues.
After a few hours research on github issues and googling, I found the current checklist to resolve this issue.
(Note: this applies to both react-slingshot and react-redux course git repo)
.eslintrc
is in your project root folder.The current ESW have some weird behavior in terms of reading
.eslintrc
. Even your.eslintrc
is not in your root folder, for example, I accidentally put mine in the/tools
folder, some of the setting will still be activated likeparserOptions
but none of therules
are valid..eslintrc
in the wrong folder would lead toParsing error: The keyword 'import' is reserved
And it is not related to the setting of your
.eslintrc
but whether it is in your root folder or not.If you didn't put
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
npm run lint
script to"esw webpack.config.* src tools; exit 0"
and change thenpm run lint:watch
script to"esw webpack.config.* src tools --watch; exit 0"
If ESW found any error or warning in your project like console statement or missing semi, the lint thread will be exit with
Exit status 1
.This will lead to an
ELIFECYCLE
error.This is actually not an error but a warning of ESW to indicate that it will print out all the warning and error. Adding exit 0 will not break the eslint checking but allow npm script to ignore the status 1 and allow ESW to print all all the warning and error.
This is not an issue I encounter but, make sure the global install is not outdate or out-sync with local project will help you resolve the 'esw' keyword. And this means we could use
esw
to replace the/node_modules/.bin/esw
.These are all the issues I found regarding debugging
npm run lint
issues. I hope this helps a lot current unresolved opened issues. Including some closed issues with is not correctly resolved.This include:
#133
#84
#150
Note: I did not reproduce the issue above, some my solution could be not working with the above issues but I think this is a pretty solid solution to the current version of
eslint/esw/npm script
.Credit to:
modules solution
exit 0 solution
The text was updated successfully, but these errors were encountered: