C
C
chelkaz2017-06-19 20:59:18
Vue.js
chelkaz, 2017-06-19 20:59:18

How to understand Vue JS errors?

For example, I now specifically made a mistake in the router, two identical constant names:

const Home = {
    template: '<div>Home</div>'
}
const Home = {
    template: '<div>Test</div>'
}
const router = new VueRouter({
    routes: [
        {path: '/', component: Home },
        {path: '/test', component: Test }
    ]
});

And I believe that such errors can be common, but how then to find the source of the problem when there is a lot of code?
The log shows nothing at all...
14 verbose stack Error: @ dev: `npm run development`
14 verbose stack Exit status 2
14 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:283:16)
14 verbose stack     at emitTwo (events.js:125:13)
14 verbose stack     at EventEmitter.emit (events.js:213:7)
14 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:125:13)
14 verbose stack     at ChildProcess.emit (events.js:213:7)
14 verbose stack     at maybeClose (internal/child_process.js:897:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
15 verbose pkgid @
16 verbose cwd /data/wwwroot/dev.com/www
17 verbose Linux 2.6.32-042stab123.1
18 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "dev"
19 verbose node v8.1.2
20 verbose npm  v5.0.3
21 error code ELIFECYCLE
22 error errno 2
23 error @ dev: `npm run development`
23 error Exit status 2
24 error Failed at the @ dev script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 2, true ]

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question