$ node -v
v8.16.2
$ npm -v
6.4.1
"vue": {
"version": "2.5.16",
"resolved": "https://registry.npmjs.org/vue/-/vue-2.5.16.tgz",
"integrity": "sha512-..."
},
"nuxt": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/nuxt/-/nuxt-1.4.1.tgz",
...
},
"webpack": {
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-3.12.0.tgz",
...
},
"uglifyjs-webpack-plugin": {
"version": "0.4.6",
...
}
<template>
<div class="container">
<h2>Complete</h2>
</div>
</template>
<script>
import Vue from 'vue'
export default {
name: 'NuxtError',
props: {
error: {
type: Object,
default: null
}
},
created() {
console.log('created');
nextUrl = "http://localhost:3000";
console.log(nextUrl);
...
}
}
</script>
console.log not working.
Please tell me resolve. Please teach me about require code for ask.
Thank you.
ESLint throws the error because it has some rules for the console, so you can try:
/ * eslint-disable no-console * /
console.log ('hello world');
or instead:
window.console.log ('Hello world');
To configure it globally, open package.json and put:
"eslintConfig": {
...
"rules": {
"no-console": "off"
},
and restart the server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With