所以我正在关注这个 udemy 课程https://www.udemy.com/course/become-a-wordpress-developer-php-javascript/我现在应该制作一个实时搜索栏,但最终我得到一个错误这完全没有意义
所以首先我的错误:
Uncaught Error: Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: C:\Users\mathi\Local Sites\test-site-2\app\public\wp-content\themes\Test_site2\js\modules\Search.js: Unexpected token (59:12)
[0m [90m 57 | [39m[32m ${combinedResults.map(item => `<li><a href="${item.link}">${item.title.rendered}</a></li>`).join('')} [39m[0m
[0m [90m 58 | [39m[32m ${combineResults.lenght ? '</ul>' : ''}`[39m)[33m;[39m[0m
[0m[31m[1m>[22m[39m[90m 59 | [39m [33m<[39m[33m/[39m[33mdiv[39m[33m>[39m[0m
[0m [90m | [39m [31m[1m^[22m[39m[0m
[0m [90m 60 | [39m[0m
[0m [90m 61 | [39m [33m<[39m[33mdiv[39m [36mclass[39m[33m=[39m[32m"one-third"[39m[33m>[39m[0m
[0m [90m 62 | [39m [33m<[39m[33mh2[39m [36mclass[39m[33m=[39m[32m"search-overlay__section-title"[39m[33m>[39m[33mPrograms[39m[33m<[39m[33m/[39m[33mh2[39m[33m>[39m[0m
at Parser.raise (C:\Users\mathi\Local Sites\test-site-2\node_modules\@babel\parser\lib\index.js:6344:17)
at Parser.unexpected (C:\Users\mathi\Local Sites\test-site-2\node_modules\@babel\parser\lib\index.js:7659:16)
at Parser.parseExprAtom (C:\Users\mathi\Local Sites\test-site-2\node_modules\@babel\parser\lib\index.js:8828:20)
at Parser.parseExprSubscripts (C:\Users\mathi\Local Sites\test-site-2\node_modules\@babel\parser\lib\index.js:8413:23)
at Parser.parseMaybeUnary (C:\Users\mathi\Local Sites\test-site-2\node_modules\@babel\parser\lib\index.js:8393:21)
at Parser.parseExprOps (C:\Users\mathi\Local Sites\test-site-2\node_modules\@babel\parser\lib\index.js:8280:23)
繁星点点滴滴
蝴蝶刀刀
相关分类