質問編集履歴
2
ソース
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,5 +1,11 @@
|
|
1
|
+
Nuxt.jsでプロジェクトを作り、npm install @nuxtjs/markdownit --saveとnpm install nuxt-fontawesome --saveで
|
1
|
-
|
2
|
+
**markdownit**と**nuxt-fontawesome**をインストールし、アイコンを使えるように以下でアイコンをインストールしました。
|
3
|
+
**$ npm install @fortawesome/free-solid-svg-icons --save**
|
4
|
+
**$ npm install @fortawesome/free-brands-svg-icons --save**
|
2
5
|
|
6
|
+
その後、Nuxt.config.jsファイルを編集し、**npm run dev**で以下のエラーになりました。
|
7
|
+
何か考えられることを含め、他に追記することが必要な場合も教えて下さい。
|
8
|
+
|
3
9
|
```npm run dev
|
4
10
|
```
|
5
11
|
FATAL Invalid or unexpected token 00:33:31
|
1
ファイルの編集
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
Nuxt
|
1
|
+
Nuxt.jsのNuxt Fatal Error
|
body
CHANGED
@@ -32,4 +32,131 @@
|
|
32
32
|
at Object.compileFunction (vm.js:381:18)
|
33
33
|
at Generator.next (<anonymous>)**
|
34
34
|
|
35
|
+
```
|
35
|
-
|
36
|
+
以下がnuxt.config.jsです。
|
37
|
+
```
|
38
|
+
|
39
|
+
// src/nuxt.config.js
|
40
|
+
|
41
|
+
export default {
|
42
|
+
mode: 'universal',
|
43
|
+
/*
|
44
|
+
** Headers of the page
|
45
|
+
*/
|
46
|
+
head: {
|
47
|
+
title: process.env.npm_package_name || '',
|
48
|
+
meta: [
|
49
|
+
{ charset: 'utf-8' },
|
50
|
+
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
51
|
+
{ hid: 'description', name: 'description', content: process.env.npm_package_description || '' }
|
52
|
+
],
|
53
|
+
link: [
|
54
|
+
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
|
55
|
+
]
|
56
|
+
},
|
57
|
+
/*
|
58
|
+
** Customize the progress-bar color
|
59
|
+
*/
|
60
|
+
loading: { color: '#fff' },
|
61
|
+
/*
|
62
|
+
** Global CSS
|
63
|
+
*/
|
64
|
+
css: [
|
65
|
+
|
66
|
+
'@fortawesome/fontawesome-svg-core/styles.css'
|
67
|
+
|
68
|
+
],
|
69
|
+
/*
|
70
|
+
** Plugins to load before mounting the App
|
71
|
+
*/
|
72
|
+
plugins: [
|
73
|
+
|
74
|
+
{ src: '~plugins/font-awesome', ssr: false }
|
75
|
+
|
76
|
+
],
|
77
|
+
/*
|
78
|
+
** Nuxt.js dev-modules
|
79
|
+
*/
|
80
|
+
devModules: [
|
81
|
+
// Doc: https://github.com/nuxt-community/nuxt-tailwindcss
|
82
|
+
'@nuxtjs/tailwindcss',
|
83
|
+
],
|
84
|
+
/*
|
85
|
+
** Nuxt.js modules
|
86
|
+
*/
|
87
|
+
modules: [
|
88
|
+
'@nuxtjs/pwa',
|
89
|
+
'@nuxtjs/markdownit',
|
90
|
+
'nuxt-fontawesome'
|
91
|
+
|
92
|
+
|
93
|
+
],
|
94
|
+
|
95
|
+
|
96
|
+
markdownit: {
|
97
|
+
html: true,
|
98
|
+
injected: true,
|
99
|
+
linkify: true,
|
100
|
+
breaks: false
|
101
|
+
},
|
102
|
+
|
103
|
+
fontawesome: {
|
104
|
+
component: 'fa'
|
105
|
+
},
|
106
|
+
|
107
|
+
|
108
|
+
/*
|
109
|
+
** Build configuration
|
110
|
+
*/
|
111
|
+
build: {
|
112
|
+
/*
|
113
|
+
** You can extend webpack config here
|
114
|
+
*/
|
115
|
+
extend (config, ctx) {
|
116
|
+
}
|
117
|
+
}
|
118
|
+
}
|
119
|
+
```
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
。
|
125
|
+
|
126
|
+
### 試したこと
|
127
|
+
**$brew doctor**
|
128
|
+
|
129
|
+
```
|
130
|
+
$ brew doctor
|
131
|
+
Please note that these warnings are just used to help the Homebrew maintainers
|
132
|
+
with debugging if you file an issue. If everything you use Homebrew for is
|
133
|
+
working fine: please don't worry or file an issue; just ignore this. Thanks!
|
134
|
+
|
135
|
+
Warning: A newer Command Line Tools release is available.
|
136
|
+
Update them from Software Update in System Preferences or run:
|
137
|
+
softwareupdate --all --install --force
|
138
|
+
|
139
|
+
If that doesn't show you an update run:
|
140
|
+
sudo rm -rf /Library/Developer/CommandLineTools
|
141
|
+
sudo xcode-select --install
|
142
|
+
|
143
|
+
Alternatively, manually download them from:
|
144
|
+
https://developer.apple.com/download/more/.
|
145
|
+
|
146
|
+
|
147
|
+
Warning: You have unlinked kegs in your Cellar.
|
148
|
+
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
|
149
|
+
those kegs to fail to run properly once built. Run `brew link` on these:
|
150
|
+
gettext
|
151
|
+
|
152
|
+
Warning: Your Xcode (11.2) is outdated.
|
153
|
+
Please update to Xcode 11.4.1 (or delete it).
|
154
|
+
Xcode can be updated from the App Store.
|
155
|
+
|
156
|
+
|
157
|
+
Warning: Your XQuartz (2.7.8) is outdated.
|
158
|
+
Please install XQuartz 2.7.11 (or delete the current version).
|
159
|
+
XQuartz can be updated using Homebrew Cask by running:
|
160
|
+
brew cask reinstall xquartz
|
161
|
+
|
162
|
+
```
|