Static GitHub Issues

[1449] Cannot read property toLowerCase of undefined

prev: rc-3: TypeError: Invalid Version: function __webpack_require__(moduleId)...
next: with nested to nested route , the second is invalid

FWIW, I'm using my custom dev server:

dev-server.js

const { Nuxt, Builder } = require('nuxt');
// const Nuxt = require('nuxt');
const app = require('express')();
const morgan = require('morgan');
const proxy = require('http-proxy-middleware');
const isProd = (process.env.NODE_ENV === 'production');
const port = process.env.PORT || 3000;

// We instantiate nuxt.js with the options
let config = require('./nuxt.config.js');
config.dev = !isProd;
const nuxt = new Nuxt(config);

const filter = (path, req) => {
	const headers = req.headers;
	const accept = headers.accept;
	const contentType = headers['content-type'];
	return (
		(accept && accept.indexOf('application/json') !== -1) ||
		(contentType && contentType.indexOf('application/json') !== -1)
	);
};

app.use(morgan('dev'));

app.use(proxy(filter, {
	target: 'https://localhost:9000',
	secure: false
}));

// Render every route with nuxt.js
app.use(nuxt.render);

// Build only in dev mode with hot-reloading
if (config.dev) {
	new Builder(nuxt).build()
	// nuxt.build()
		.catch((error) => {
			console.error(error);
			process.exit(1);
		});
}

// Listen the server
app.listen(port, '0.0.0.0');
console.log('Server listening on localhost:' + port);

nuxt.config.js

module.exports = {
	srcDir: 'src',

	/*
	** Headers of the page
	*/
	head: {
		title: 'Hooklift Identity',
		meta: [
			{ charset: 'utf-8' },
			{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
			{ hid: 'description', name: 'description', content: 'Hooklift' }
		],
		link: [
			{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
		]
	},

	modules: [
		['@nuxtjs/google-analytics', { ua: 'UA-XXXXXXXX-X' }]
	],

	/*
	** Plugins to run before instantiating the root vue.js application
	*/
	plugins: [
		{ src: '~plugins/api-client', ssr: false }
		// { src: '~plugins/notify', injectAs: 'notify', ssr: false }
		// { src: '~plugins/i18n', injectAs: 'i18n' }
	],
	/*
	** Customize the progress-bar color
	*/
	loading: { color: '#3B8070' },

	/*
	** Build configuration
	*/
	build: {
		vendor: [
			'swagger-client'
		],
		/*
		** Run ESLINT on save
		*/
		extend (config, ctx) {
			if (ctx.isClient) {
				config.module.rules.push({
					enforce: 'pre',
					test: /\.(js|vue)$/,
					loader: 'eslint-loader',
					exclude: /(node_modules)/
				});
			}
		}
	},
	css: [
		'normalize.css/normalize.css',
		'~static/gotham-narrow-v3.css',
		'~assets/styles/app.scss'
	]
};
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1289">#c1289</a>)</em></sub></div>