Reference documents:
https://www.baidu.com/link?url=rxkuHBNVNB0i7GCoDEfgkwDr3AllV9XWRLWwkFQl7p1PjamwyIPupL93spZDTywmxMetZ7yHNtqtgJRPGR0POa& ; wd=& eqid=d1c30348003392a90000000461721b6e
Problem background:
After pulling a branch for the project code, execute NPM install to download the dependent package, and then execute NPM run serve to find that the project fails to run. The prompt message is syntax error: typeerror: token.type.endswith is not a function.
Solution:
The author’s version of Babel eslint is 10.1.0, and the version is reduced to 8.2.2. The project is run again and runs successfully.
remarks:
The reason for the error seen on GitHub is that the version of Babel eslint is wrong, and the version reduction can indeed solve this problem. However, it is strange that the Babel eslint version of the author’s trunk is the same as that of the branch, both of which are 10.1.0, while the trunk project can run successfully, but the branch project can’t.
Read More:
- Problems with vue project installation No ESLint configuration found
- package.json And package- clock.json The difference between
- Module build failed (from ./node_modules/babel-loader/lib/index.js) babel-loader
- Error reporting of eslint in webstorm
- Module build failed: SyntaxError: Unexpected token
- Failed to load plugin jsdoc: Cannot find module ‘eslint-plugin-jsdoc‘
- Error: Cannot find module ‘@babel/core’
- git error: src refspec dev does not match any
- Vue の NPM run serve error: parsing error: unexpected token<
- Module build failed Error Plugin/Preset files are not allowed to export objects, only functions (How to Fix)
- [Git] git pull pull remote git push to remote git commit submit reject
- Expected indentation of 6 spaces but found 10
- git push error failed to push some refs to solution
- Error: pathspec ‘origin / xxx’ did not match any file (s) known to GIT
- Solve the problem of “error empty block statement no empty” in the console (Vue project)
- Module build failed: error:couldn’t find preset “env” relative to directory
- [How to Fix] Cannot find module ‘babel-eslint‘
- Ego planner swarm installation and error reporting solution
- How to Fix GIT Push Error
- Error in Babel configuration of webpack