I'm running into some issues while trying to execute the Gridsome build on a starter project template. The website works fine on localhost
. I attempted to update or install any missing packages by using npm install gridsome@latest
.
However, when I run Gridsome build, it throws the following error:
Could not generate HTML for "/work/":
TypeError: Cannot read property 'console' of null
at Object. (C:\Users\Micah\Desktop\my-gridsome-site\node_modules\vue-meta\dist\vue-meta.common.js:103:23)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at C:\Users\Micah\Desktop\my-gridsome-site\node_modules\vue-server-renderer\build.prod.js:1:77671
at Object. (webpack:/external "vue-meta":1:0)
The segment of code at vue-meta.common.js:103:23
includes the line
var console = _global.console || {};
:
var hasGlobalWindow = hasGlobalWindowFn();
var _global = hasGlobalWindow ? window : global;
var console = _global.console || {};
function warn(str) {
/* istanbul ignore next */
if (!console || !console.warn) {
return;
}
console.warn(str);
}
var showWarningNotSupported = function showWarningNotSupported() {
return warn('This vue app/component has no vue-meta configuration');
};
Steps to replicate the issue:
Execute gridsome build from the command line.
Environment details:
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz
Binaries:
Node: 10.16.3 - C:\Program Files\nodejs\node.EXE
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 44.18362.449.0
npmPackages:
gridsome: ^0.7.11 => 0.7.11
gridsome-plugin-tailwindcss: ^2.2.26 => 2.2.26