uni-app compilation error Error: pages.json parsing failed, does not conform to the json specification Unexpected token ')'

 question

When using webstorm to develop a project, open pages.json habitually ctrl+alt+l to format the code, and then report an error.

Then use HBuilder to compile, but it has been displayed in the compilation, and there is no reflection at all. Neither restarting the compiler nor restarting the computer helped.

 I don't care and then compile and report an error.

Add a comma to run again or report an error

Restore the code to Beyond Compare comparison, it is caused by an extra comma 

 analyze::

This place is more subtle, conditional compilation, only the Baidu applet has the following: usingComponents, now mine is a WeChat applet, so in softinputMode:adjustResize here is the last key value of {}, it cannot be the last key value Yes, no commas allowed! ! !

solve:

Put the comma on the next line of ifdef. After entering the if statement, the softinputMode needs a comma if it is not the last item.

This compiles OK.

reference:

Small program error pages/xxx/xxx.json file parsing error SyntaxError: Unexpected end of JSON input_qq small program readjson error_guochanof's blog-CSDN blog

Guess you like

Origin blog.csdn.net/LlanyW/article/details/132470818