Nuxt.jsでプロジェクトを作り、npm install @nuxtjs/markdownit --saveとnpm install nuxt-fontawesome --saveで
markdownitとnuxt-fontawesomeをインストールし、アイコンを使えるように以下でアイコンをインストールしました。
$ npm install @fortawesome/free-solid-svg-icons --save
$ npm install @fortawesome/free-brands-svg-icons --save
その後、Nuxt.config.jsファイルを編集し、npm run devで以下のエラーになりました。
何か考えられることを含め、他に追記することが必要な場合も教えて下さい。
npm
1
FATAL Invalid or unexpected token 00:33:31
SyntaxError: Invalid or unexpected token
at Object.compileFunction (vm.js:381:18)
at Generator.next (<anonymous>)
╭──────────────────────────────────────────────╮
│ │
│ ✖ Nuxt Fatal Error │
│ │
│ SyntaxError: Invalid or unexpected token │
│ │
╰──────────────────────────────────────────────╯
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! jam_portfolio@1.0.0 dev: nuxt
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the jam_portfolio@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:
SyntaxError: Invalid or unexpected token
at Object.compileFunction (vm.js:381:18)
at Generator.next (<anonymous>)
以下がnuxt.config.jsです。
// src/nuxt.config.js
export default {
mode: 'universal',
/*
** Headers of the page
/
head: {
title: process.env.npm_package_name || '',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: process.env.npm_package_description || '' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
/
** Customize the progress-bar color
/
loading: { color: '#fff' },
/
** Global CSS
/
css: [
'@fortawesome/fontawesome-svg-core/styles.css'
],
/
** Plugins to load before mounting the App
/
plugins: [
{ src: '~plugins/font-awesome', ssr: false }
],
/
** Nuxt.js dev-modules
/
devModules: [
// Doc: https://github.com/nuxt-community/nuxt-tailwindcss
'@nuxtjs/tailwindcss',
],
/
** Nuxt.js modules
*/
modules: [
'@nuxtjs/pwa',
'@nuxtjs/markdownit',
'nuxt-fontawesome'
],
markdownit: {
html: true,
injected: true,
linkify: true,
breaks: false
},
fontawesome: {
component: 'fa'
},
/*
** Build configuration
/
build: {
/
** You can extend webpack config here
*/
extend (config, ctx) {
}
}
}
。 ### 試したこと **$brew doctor**
$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
softwareupdate --all --install --force
If that doesn't show you an update run:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
Alternatively, manually download them from:
https://developer.apple.com/download/more/.
Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run brew link
on these:
gettext
Warning: Your Xcode (11.2) is outdated.
Please update to Xcode 11.4.1 (or delete it).
Xcode can be updated from the App Store.
Warning: Your XQuartz (2.7.8) is outdated.
Please install XQuartz 2.7.11 (or delete the current version).
XQuartz can be updated using Homebrew Cask by running:
brew cask reinstall xquartz
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/05/10 05:38
2020/05/10 17:46
2020/05/12 14:21