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:
- Front end project construction error unexpected character ‘@’ solution
- Syntax error: typeerror: this.getoptions is not a function an error is reported when the. SCSS file is imported globally
- Typeerror in gitbook init: cb.apply is not a function solution
- Front end Vue project operation error module build failed
- Solve the problem of syntax error: unexpected end of file or syntax error near unexpected token ` fi ‘error
- JS error – typeerror: XXX is not a function
- About iView reporting error in Vue project: error in mounted hook: “typeerror: this$ parent.updateNav is not a function”
- syntax error near unexpected token `then’ problem solution
- Syntax error: unexpected token in uni app project compilation
- Webpack error module build failed: typeerror: fileSystem.statSync is not a function
- The back end cannot receive the parameters passed by the front end
- Nginx front end and back end separation + service cluster reverse proxy
- TypeError: connection.connect is not a function
- After introducing sass into Vue project, start to report error typeerror [err]_ INVALID_ ARG_ Type]: the “path” argument must be of type string
- Using webpack to report typeerror: this.getresolve is not a function
- [Solved] Error handling response: TypeError: self.processResponse is not a function
- TypeError: this.getOptions is not a function
- TypeError: this.getOptions is not a function at Object.lessLoader
- TypeError: object of type ‘builtin_function_or_method’ has no len()
- The time of the time database displayed by the front end is inconsistent