当前位置:网站首页>Nodejs reads the local JSON file through require. Unexpected token / in JSON at position appears

Nodejs reads the local JSON file through require. Unexpected token / in JSON at position appears

2022-04-23 16:43:00 Hair loss programmer

Problem description

nodejs adopt require Read local json The file appears Unexpected token / in JSON at
position
 Insert picture description here

Solution

Read the json There are comments in the document , Just delete all the comments

版权声明
本文为[Hair loss programmer]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231400278488.html