第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

SyntaxError: Unexpected token || 在 /var/www/html/v

SyntaxError: Unexpected token || 在 /var/www/html/v

泛舟湖上清波郎朗 2022-05-22 11:04:30
我正在嘗試從他在 Udemy 上的 Web Dev Bootcamp 構(gòu)建類似于 Colt Steele 的 YelpCamp 項(xiàng)目的東西。我的項(xiàng)目一直進(jìn)行到課程結(jié)束時(shí)使用提供的 YouTube 材料進(jìn)行重構(gòu)。我收到以下錯(cuò)誤消息,試圖顯示數(shù)據(jù)庫(kù)中的任何內(nèi)容:SyntaxError: Unexpected token || in /var/www/html/views/components/show.ejs while compiling ejsIf the above error is not helpful, you may want to try EJS-Lint:https://github.com/RyanZim/EJS-LintOr, if you meant to create an async function, pass `async: true` as an option.    at new Function (<anonymous>)    at Template.compile (/var/www/html/node_modules/ejs/lib/ejs.js:626:12)    at Object.compile (/var/www/html/node_modules/ejs/lib/ejs.js:366:16)    at handleCache (/var/www/html/node_modules/ejs/lib/ejs.js:215:18)    at tryHandleCache (/var/www/html/node_modules/ejs/lib/ejs.js:254:16)    at View.exports.renderFile [as engine] (/var/www/html/node_modules/ejs/lib/ejs.js:459:10)    at View.render (/var/www/html/node_modules/express/lib/view.js:135:8)    at tryRender (/var/www/html/node_modules/express/lib/application.js:640:10)    at Function.render (/var/www/html/node_modules/express/lib/application.js:592:3)    at ServerResponse.render (/var/www/html/node_modules/express/lib/response.js:1012:7)    at /var/www/html/routes/components.js:84:17    at /var/www/html/node_modules/mongoose/lib/model.js:4834:16    at /var/www/html/node_modules/mongoose/lib/helpers/promiseOrCallback.js:24:16    at /var/www/html/node_modules/mongoose/lib/model.js:4857:21    at _hooks.execPost (/var/www/html/node_modules/mongoose/lib/query.js:4366:11)    at /var/www/html/node_modules/kareem/index.js:135:16我的 /components/show(基本上是 campgrounds/show)代碼如下所示:<%- include ("../partials/header") %><title><%=component.name%></title><%- include ("../partials/nav") %>  <div class="row">    <div class="col-md-3">      <p class="lead">PC Part Inventory</p>      <div class="list-group">        <li class="list-group-item active">Info 1</li>        <li class="list-group-item">Info 2</li>        <li class="list-group-item">Info 3</li>      </div>    </div>
查看完整描述

1 回答

?
明月笑刀無(wú)情

TA貢獻(xiàn)1828條經(jīng)驗(yàn) 獲得超4個(gè)贊

在第 45 行,調(diào)用后有一個(gè)額外的右括號(hào)comment.author.id.equals(currentUser._id)。


<% if(currentUser && comment.author.id.equals(currentUser._id)) || currentUser && currentUser.isAdmin){ %>

  <!--                                                      ^^^^             -->

  <a class="btn btn-xs btn-warning"

    href="/components/<%= component._id %>/comments/<%= comment._id %>/edit">Edit</a>

  <form class="delete-form" action="/components/<%= component._id %>/comments/<%= comment._id %>?_method=DELETE" method="post">

    <input type="submit" class="btn btn-xs btn-danger" value="Delete">

  </form>

</div>

<% } %>

錯(cuò)誤消息還建議使用ejs-lint來(lái)獲取更多有用的錯(cuò)誤消息。我建議嘗試一下。在這種情況下,它打?。?/p>


Unexpected token (45:81) in test.ejs


查看完整回答
反對(duì) 回復(fù) 2022-05-22
  • 1 回答
  • 0 關(guān)注
  • 312 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)