前提・実現した
nuxt.jsでSPAを作っています。
configあたりを触ってエラーが起きたんですが解決できずググっても見当たらなかったので困っています。
色々試してるうちにもともとどこをいじってしまったのかもわからなくなってしまいました。
######追記
nuxt.config.jsのmodule:[]の中身をからにすると動くのでここが悪いということまではわかりました、、
どのファイルを見ればいいかがわからず、ご教示ください、、
発生している問題・エラーメッセージ
FATAL meta is not defined 18:47:57 ReferenceError: meta is not defined at ModuleContainer.addModule (node_modules/@nuxt/core/dist/core.js:173:24) at promise.then (node_modules/@nuxt/utils/dist/utils.js:1724:43) ╭─────────────────────────────────────────╮ │ │ │ ✖ Nuxt Fatal Error │ │ │ │ ReferenceError: meta is not defined │ │ │ ╰─────────────────────────────────────────╯ npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! nuxtapp@1.0.0 dev: `nuxt` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the nuxtapp@1.0.0 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! /Users/*****/.npm/_logs/2019-03-30T09_47_57_366Z-debug.log
試したこと
rm -rf node_modules npm cache clean --force npm i
#nuxt.config.js
import pkg from './package' export default { mode: 'universal', /* ** Headers of the page */ head: { title: pkg.name, titleTemplate: '%s - YOYOYO', meta: [ { charset: 'utf-8' }, { name: 'viewport', content: 'width=device-width, initial-scale=1' }, { hid: 'description', name: 'description', content: pkg.description } ], link: [ { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' } ] }, /* ** Customize the progress-bar color */ loading: { color: '#fff' }, /* ** Global CSS */ css: [ // プロジェクト内の SCSS ファイル '@/assets/css/main.scss' ], /* ** Plugins to load before mounting the App */ plugins: [ ], /* ** Nuxt.js modules */ modules: [ 'nuxt-user-agent', '~/assets/css/main.scss' ], axios: { }, /* ** Build configuration */ build: { /* ** You can extend webpack config here */ extend(config, ctx) { } } }
補足情報(FW/ツールのバージョンなど)
npm: 6.7.0
回答1件
あなたの回答
tips
プレビュー