Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

iverano's avatar

Error compiling Vuejs and Laravel

Hey Guys,

Could someone give me a hand with please?....

When:

npm run dev

Compiled with some errors in 1.04m

ERROR in ./resources/js/Pages/sales/order/index.vue?vue&type=template&id=a0319dd6& (./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/Pages/sales/order/index.vue?vue&type=template&id=a0319dd6&) Module build failed (from ./node_modules/vue-loader/lib/loaders/templateLoader.js): SyntaxError: Unterminated string constant. (1:3051) at instantiate (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:63:32) at constructor (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:358:12) at Parser.raise (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:3207:19) at Object.unterminated (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:2210:20) at readStringContents (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:1948:16) at Parser.readString (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:3093:9) at Parser.getTokenFromCode (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:2821:14) at Parser.nextToken (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:2331:10) at Parser.next (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:2242:10) at Parser.parseExprOp (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10682:14) at Parser.parseExprOps (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10650:17) at Parser.parseMaybeConditional (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10623:23) at Parser.parseMaybeAssign (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10584:21) at /home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10554:39 at Parser.allowInAnd (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:12234:12) at Parser.parseMaybeAssignAllowIn (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10554:17) at Parser.parseExprListItem (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:11986:18) at Parser.parseCallExpressionArguments (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:11041:22) at Parser.parseCoverCallAndAsyncArrowHead (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10951:29) at Parser.parseSubscript (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10886:19) at Parser.parseSubscripts (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10857:19) at Parser.parseExprSubscripts (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10848:17) at Parser.parseUpdate (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10827:21) at Parser.parseMaybeUnary (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10803:23) at Parser.parseMaybeUnaryOrPrivate (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10641:61) at Parser.parseExprOps (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10646:23) at Parser.parseMaybeConditional (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10623:23) at Parser.parseMaybeAssign (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10584:21) at /home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10554:39 at Parser.allowInAnd (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:12234:12) at Parser.parseMaybeAssignAllowIn (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10554:17) at Parser.parseExprListItem (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:11986:18) at Parser.parseCallExpressionArguments (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:11041:22) at Parser.parseCoverCallAndAsyncArrowHead (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10951:29) at Parser.parseSubscript (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10886:19) at Parser.parseSubscripts (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10857:19) at Parser.parseExprSubscripts (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10848:17) at Parser.parseUpdate (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10827:21) at Parser.parseMaybeUnary (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10803:23) at Parser.parseMaybeUnaryOrPrivate (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10641:61) at Parser.parseExprOps (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10646:23) at Parser.parseMaybeConditional (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10623:23) at Parser.parseMaybeAssign (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10584:21) at /home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10554:39 at Parser.allowInAnd (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:12234:12) at Parser.parseMaybeAssignAllowIn (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:10554:17) at Parser.parseExprListItem (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:11986:18) at Parser.parseExprList (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:11958:22) at Parser.parseArrayLike (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:11858:26) at Parser.parseExprAtom (/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/@babel/parser/lib/index.js:11127:23)

webpack compiled with 1 error npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ development: mix npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ development script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/master/.npm/_logs/2023-08-14T23_15_21_998Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ dev: npm run development npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ dev script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/master/.npm/_logs/2023-08-14T23_15_22_035Z-debug.log

This is the log:

0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli '/home/master/.nvm/versions/node/v14.21.3/bin/node', 1 verbose cli '/home/master/.nvm/versions/node/v14.21.3/bin/npm', 1 verbose cli 'run', 1 verbose cli 'dev' 1 verbose cli ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'predev', 'dev', 'postdev' ] 5 info lifecycle @~predev: @ 6 info lifecycle @~dev: @ 7 verbose lifecycle @~dev: unsafe-perm in lifecycle true 8 verbose lifecycle @~dev: PATH: /home/master/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/875483.cloudwaysapps.com/jbwjybmfvt/public_html/node_modules/.bin:/home/master/.nvm/versions/node/v14.21.3/bin:/home/master/.vscode-server/bin/6c3e3dba23e8fadc360aed75ce363ba185c49794/bin/remote-cli:/usr/local/bin:/usr/bin:/bin:/usr/games 9 verbose lifecycle @~dev: CWD: /home/875483.cloudwaysapps.com/jbwjybmfvt/public_html 10 silly lifecycle @~dev: Args: [ '-c', 'npm run development' ] 11 silly lifecycle @~dev: Returned: code: 1 signal: null 12 info lifecycle @~dev: Failed to exec dev script 13 verbose stack Error: @ dev: npm run development 13 verbose stack Exit status 1 13 verbose stack at EventEmitter. (/home/master/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:400:28) 13 verbose stack at ChildProcess. (/home/master/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:400:28) 13 verbose stack at maybeClose (internal/child_process.js:1088:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5) 14 verbose pkgid @ 15 verbose cwd /home/875483.cloudwaysapps.com/jbwjybmfvt/public_html 16 verbose Linux 4.19.0-22-cloud-amd64 17 verbose argv "/home/master/.nvm/versions/node/v14.21.3/bin/node" "/home/master/.nvm/versions/node/v14.21.3/bin/npm" "run" "dev" 18 verbose node v14.21.3 19 verbose npm v6.14.18 20 error code ELIFECYCLE 21 error errno 1 22 error @ dev: npm run development 22 error Exit status 1 23 error Failed at the @ dev script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

0 likes
3 replies
tykus's avatar

There is a SyntaxError: Unterminated string constant error message which might be germane. What does the index.vue Vue component look like?

iverano's avatar

@tykus Thank you Tykus for replay. It is:

            <template v-for="(item, keys) in listDetails">
                <div class="accordion" :id="'accordionReview' + item.id" :key="keys">
                    <div class="card">
                        <div class="card-header bg-light" :id="'heading' + item.id">
                            <div class="row">
                                <div class="col-5">
                                    <h3 class="mb-0">
                                        <button class="btn btn-link" type="button" data-toggle="collapse"
                                            :data-target="`#collapse${item.id}`" aria-expanded="false"
                                            :aria-controls="`collapse${item.id}`">
                                            <i class="fa fa-arrow-down"></i> Delivery {{ listDetails.length > 1 ? keys +
                                                1 : ''
                                            }}
                                        </button>
                                    </h3>
                                </div>
                                <div class="col-6">
                                    <div class="float-right">
                                        <span class="text-blue">
                                            FROM: <small>{{ item.origin_address + ' ' + item.origin_city + ' ' +
                                                item.origin_country }}</small> &nbsp; &nbsp; &nbsp; TO: <small>{{
    item.destination_address + ' ' + item.destination_city + ' ' +
    item.destination_country }}</small>
                                        </span>
                                    </div>
                                </div>
                                <div class="col-1" v-if="!minitem">
                                    <div class="float-right">
                                        <button class="btn btn-info-inline" @click.prevent="removeitems(item.id)"
                                            title="Delete Order"><i class="fa fa-trash" aria-hidden="true"></i></button>
                                    </div>
                                </div>

                            </div>
                        </div>

                        <div :id="'collapse' + item.id" class="collapse" :aria-labelledby="`heading${item.id}`"
                            :data-parent="`#accordionReview${item.id}`">
                            <div class="card-body">

                                <div class="row mb-4">
                                    <div class="col-md-6">
                                        <div class="box shadow p-4 mb-4">
                                            <h5 class="mb-4">Origin</h5>

                                            <p class="mb-2">{{ item.origin_address + ' ' + item.origin_city + ' ' +
                                                item.origin_country }}</p>

                                            <p>
                                                {{ item.account.name }}<br>
                                                {{ item.contact_origin.fullname }}<br>

                                                Phone: {{ item.contact_origin.mobile }}<br>

                                                <!-- Phone: {{ item.account.phone }} -->
                                            </p>

                                            <button class="btn btn-primary btn-sm my-3" type="button"
                                                @click="openModal('editOrigin', item)">Edit</button>

                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="box shadow p-4 mb-4">
                                            <h5 class="mb-4">Destination</h5>

                                            <p class="mb-2">{{ item.destination_address + ' ' + item.destination_city +
                                                ' ' + item.destination_country }}</p>

                                            <p>
                                                {{ item.account.name }}<br>
                                                {{ item.contact_destination.fullname }}<br>

                                                Phone: {{ item.contact_destination.mobile }}<br>

                                                <!-- Phone: {{ item.account.phone }} -->
                                            </p>

                                            <button class="btn btn-primary btn-sm my-3" type="button"
                                                @click="openModal('editDestination', item)">Edit</button>

                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="box shadow p-4 mb-4">
                                            <h5 class="mb-4">Service</h5>

                                            <p>{{ item.service.name + (item.type_services ? ' - ' +
                                                item.type_services.name : '') }}</p>

                                            <button class="btn btn-primary btn-sm mt-3" type="button"
                                                @click="openModal('editService', item)">Edit</button>

                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="box shadow p-4 mb-4">
                                            <h5 class="mb-4">Collection Details</h5>

                                            <p>{{ item.date_collectdisplay + ' at ' + item.time_collectdisplay }}</p>

                                            <button class="btn btn-primary btn-sm mt-3" type="button"
                                                @click="openModal('editDate', item)">Edit</button>

                                        </div>
                                    </div>

                                    <div class="col-md-6">
                                        <div class="box shadow p-4 mb-4">
                                            <h5 class="mb-4">Authority to leave</h5>

                                            <p>{{ item.authority == 1 ? 'Yes' : 'No' }}</p>

                                            <button class="btn btn-primary btn-sm mt-3" type="button"
                                                @click="openModal('editAuthority', item)">Edit</button>

                                        </div>
                                    </div>

                                </div>

                                <hr>

                                <div class="accordion mt-4" :id="'accordionReviewDetail' + item.id">
                                    <div class="card">
                                        <div class="card-header bg-light" :id="'headingDetail' + item.id">
                                            <h3 class="mb-0">
                                                <button class="btn btn-link" type="button" data-toggle="collapse"
                                                    :data-target="`#collapseDetail${item.id}`" aria-expanded="true"
                                                    :aria-controls="`collapseDetail${item.id}`">
                                                    <i class="fa fa-arrow-down"></i> Items
                                                </button>
                                            </h3>
                                        </div>

                                        <div :id="'collapseDetail' + item.id" class="collapse"
                                            :aria-labelledby="`headingDetail${item.id}`"
                                            :data-parent="`#accordionReviewDetail${item.id}`">
                                            <div class="card-body">
                                                <div class="table-responsive">
                                                    <table
                                                        class="table table-condensed table-head-fixed text-nowrap text-center">
                                                        <thead>
                                                            <tr>
                                                                <th>Height <small>(cm)</small></th>
                                                                <th>Width <small>(cm)</small></th>
                                                                <th>Length <small>(cm)</small></th>
                                                                <th>Total Volume <small>(m3)</small></th>
                                                                <th>Weight <small>(kg)</small></th>
                                                                <th>Qty</th>
                                                                <th>Total Weight <small>(kg)</small></th>
                                                                <th>
                                                                    <button class="btn btn-outline-secondary btn-sm"
                                                                        @click="openModal('editItems', { 'id': item.id, 'type': 'Add' })"><i
                                                                            class="fas fa-plus"
                                                                            aria-hidden="true"></i></button>
                                                                </th>
                                                            </tr>
                                                        </thead>
                                                        <tbody>
                                                            <tr v-for="(item, keysi) in item.items" :key="item.id">
                                                                <td>{{ item.height }}</td>
                                                                <td>{{ item.width }}</td>
                                                                <td>{{ item.length }}</td>
                                                                <td>{{ parseFloat(((item.height * item.width *
                                                                    item.length
                                                                ) * item.quantity) / 1000).toFixed(2) }} </td>
                                                                <td>{{ item.weight }}</td>
                                                                <td>{{ item.quantity }}</td>
                                                                <td>{{ parseFloat(item.weight *
                                                                    item.quantity).toFixed(2) }}</td>
                                                                <td>
                                                                    <button class="btn btn-info-inline"
                                                                        @click="openModal('editItems', { ...item, 'type': 'Edit' })"><i
                                                                            class="fas fa-pencil-alt"
                                                                            aria-hidden="true"></i></button>
                                                                    <button v-if="keysi > 0" class="btn btn-info-inline"
                                                                        @click.prevent="removeorderitems(item.id)"
                                                                        title="Delete Order item"><i class="fa fa-trash"
                                                                            aria-hidden="true"></i></button>
                                                                </td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </div>
                                            </div>
                                        </div>
                                    </div>


                                    <hr>

                                    <div class="card">
                                        <div class="card-header bg-light" :id="'headingDetail' + (item.id + 1)">
                                            <h3 class="mb-0">
                                                <button class="btn btn-link" type="button" data-toggle="collapse"
                                                    :data-target="`#collapseDetail${item.id + 1}`" aria-expanded="true"
                                                    :aria-controls="`collapseDetail${item.id + 1}`">
                                                    <i class="fa fa-arrow-down"></i> Additional Services
                                                </button>
                                            </h3>
                                        </div>

                                        <div :id="'collapseDetail' + (item.id + 1)" class="collapse"
                                            :aria-labelledby="`headingDetail${item.id + 1}`"
                                            :data-parent="`#accordionReviewDetail${item.id}`">
                                            <div class="card-body">

                                                <div class="row mb-4">
                                                    <div class="col-md-6">
                                                        <div class="box shadow p-2 mb-4">
                                                            <h5 class="my-4">Pick Up Location</h5>

                                                            <p v-for="item in item.service_start" :key="item.id"><i
                                                                    class="fas fa-check"></i> {{ item.name }}</p>

                                                            <button class="btn btn-primary mt-3" type="button"
                                                                @click="openModal('editServiceStart', item)">Edit</button>

                                                        </div>
                                                    </div>
                                                    <div class="col-md-6">
                                                        <div class="box shadow p-2 mb-4">
                                                            <h5 class="my-4">Delivery Location</h5>

                                                            <p v-for="item in item.service_end" :key="item.id"><i
                                                                    class="fas fa-check"></i> {{ item.name }}</p>


                                                            <button class="btn btn-primary mt-3" type="button"
                                                                @click="openModal('editServiceEnd', item)">Edit</button>

                                                        </div>
                                                    </div>
                                                    <div class="col-12">
                                                        <div class="box shadow p-2 mb-4">
                                                            <h5 class="my-4">Delivery Instructions</h5>

                                                            <p class="mb-2">{{ item.notes }}</p>

                                                            <button class="btn btn-primary mt-3" type="button"
                                                                @click="openModal('editNotes', item)">Edit</button>

                                                        </div>
                                                    </div>

                                                </div>

                                            </div>
                                        </div>

                                    </div>


                                </div>

                            </div>
                        </div>
                    </div>
                </div>
            </template>

        </div>

Please or to participate in this conversation.