package.json
"name": "ontheroadstore_v3",
"version": "1.0.0",
"description": "公路商店",
"author": "PsychoKiller <fucked@psychokiller.me>",
"private": true,
"scripts": {
"dev": "cross-env HOST=0.0.0.0 PORT=3333 nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate",
"lint": "eslint --ext --fix .js,.vue --ignore-path .eslintignore .",
"precommit": "npm run lint"
},
"dependencies": {
"animate.css": "^3.5.2",
"axios": "^0.16.2",
"cross-env": "^5.0.5",
"css-loader": "^0.28.5",
"element-ui": "^1.4.2",
"hover.css": "^2.2.1",
"node-sass": "^4.5.3",
"normalize.css": "^7.0.0",
"nuxt": "^1.0.0-rc3",
"qr-image": "^3.2.0",
"sass-loader": "^6.0.6",
"smooth-scrollbar": "^7.4.0",
"underscore": "^1.8.3",
"vue-baidu-map": "^0.12.0",
"vue-lazyload": "^1.0.6"
},
"devDependencies": {
"babel-eslint": "^7.2.3",
"eslint": "^4.3.0",
"eslint-config-standard": "^10.2.1",
"eslint-loader": "^1.9.0",
"eslint-plugin-html": "^3.1.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.1.1",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-standard": "^3.0.1"
}
}
nuxt.config.js
/*
** Headers of the page
*/
head: {
title: '公路商店',
titleTemplate: '%s - 公路商店',
htmlAttrs: {
xmlns: 'http://www.w3.org/1999/xhtml',
lang: 'zh'
},
meta: [
{ charset: 'utf-8' },
{ 'http-equiv': 'cleartype', content: 'on' },
{ name: 'author', content: 'fucked@psychokiller.me' },
{ name: 'MobileOptimized', content: '320' },
{ name: 'HandheldFriendly', content: 'True' },
{ name: 'apple-mobile-web-app-capable', content: 'yes' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1.0, user-scalable=no' },
{ hid: 'description', name: 'description', content: 'Nuxt.js project' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
cache: {
max: 20,
maxAge: 600000
},
performance: {
gzip: true
},
/*
** Customize the progress-bar color
*/
loading: '~/components/loading.vue',
css: [
{ src: '~/assets/css/main.scss', lang: 'scss' },
{ src: 'element-ui/lib/theme-default/index.css' },
{ src: 'animate.css/animate.min.css' },
{ src: 'hover.css/scss/hover.scss', lang: 'scss' },
{ src: 'smooth-scrollbar/dist/smooth-scrollbar.css' }
],
plugins: [
{ src: '~/plugins/element-ui.js', ssr: true },
{ src: '~/plugins/lazyload.js', ssr: false },
{ src: '~/plugins/smooth-scroll.js', ssr: false },
{ src: '~/plugins/sticky.js', ssr: false },
// { src: '~/plugins/ga.js', ssr: true },
// { src: '~/plugins/baidu-seo-push.js', ssr: true },
{ src: '~/plugins/highlighter.js', ssr: false },
{ src: '~/plugins/baidu-map.js', ssr: true }
],
/*
** Build configuration
*/
build: {
/*
** Run ESLINT on save
*/
extend (config, ctx) {
if (ctx.dev && ctx.isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/
})
}
}
}
}
yarn build
yarn build v0.27.5
$ nuxt build
nuxt:build Building... +0ms
nuxt:build App root: /alidata/www/heishi/webroot/ontheroadstore +0ms
nuxt:build Generating /alidata/www/heishi/webroot/ontheroadstore/.nuxt files... +0ms
nuxt:build Generating files... +22ms
nuxt:build Generating routes... +27ms
nuxt:build Building files... +103ms
Build completed in 142.17s
Hash: f677a6744ba416ad4193
Version: webpack 3.5.5
Time: 142187ms
Asset Size Chunks Chunk Names
pages/article.da9956c86c0a44ed3be3.js 6.6 kB 7 [emitted] pages/article
fonts/element-icons.d2f69a9.woff 8 kB [emitted]
fonts/element-icons.b02bdc1.ttf 13.2 kB [emitted]
pages/article-detail-id.ce7db4f0063339fda485.js 144 kB 0 [emitted] pages/article-detail-id
pages/store-detail-id.5d2cd86956fa5bd6b10d.js 152 kB 1 [emitted] pages/store-detail-id
pages/video-detail-id.7059b70cd4c61bc827d1.js 139 kB 2 [emitted] pages/video-detail-id
layouts/default.9c9e6b2b1b6f9dde2925.js 16.6 kB 3 [emitted] layouts/default
pages/video.a4e29da581e6e4e38173.js 6.93 kB 4 [emitted] pages/video
pages/store.2471820b9868994e3bca.js 5.03 kB 5 [emitted] pages/store
pages/search.ffce815e6842e47d6727.js 7.41 kB 6 [emitted] pages/search
img/logo.7a584d8.png 3.68 kB [emitted]
pages/store-pages.cd379bc51f087f2c2c4f.js 4.85 kB 8 [emitted] pages/store-pages
pages/article-pages.c74d4bc4b8809b549315.js 5.72 kB 9 [emitted] pages/article-pages
pages/job.353e66bb5ba72240fa6f.js 4.66 kB 10 [emitted] pages/job
pages/about.f5777ee290bfd3bda6ea.js 7.53 kB 11 [emitted] pages/about
pages/index.8be82fd2154ffe575a2a.js 238 bytes 12 [emitted] pages/index
app.1866a69048357b95d104.js 1.03 MB 13 [emitted] [big] app
common.b434c77cf399d898a702.js 136 kB 14 [emitted] common
manifest.f677a6744ba416ad4193.js 2.1 kB 15 [emitted] manifest
LICENSES 1.8 kB [emitted]
+ 19 hidden assets
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (300 kB).
This can impact web performance.
Assets:
app.1866a69048357b95d104.js (1.03 MB)
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (1 MB). This can impact web performance.
Entrypoints:
app (1.17 MB)
manifest.f677a6744ba416ad4193.js
common.b434c77cf399d898a702.js
app.1866a69048357b95d104.js
ERROR in ./node_modules/babel-loader/lib?{"presets":["/alidata/www/heishi/webroot/ontheroadstore/node_modules/babel-preset-vue-app/dist/index.common.js"],"babelrc":false,"cacheDirectory":false}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/index.vue
Module not found: Error: Can't resolve '~/components/index/Article' in '/alidata/www/heishi/webroot/ontheroadstore/pages'
@ ./node_modules/babel-loader/lib?{"presets":["/alidata/www/heishi/webroot/ontheroadstore/node_modules/babel-preset-vue-app/dist/index.common.js"],"babelrc":false,"cacheDirectory":false}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/index.vue 24:0-56
@ ./pages/index.vue
@ ./.nuxt/router.js
@ ./.nuxt/index.js
@ ./.nuxt/client.js
ERROR in ./node_modules/babel-loader/lib?{"presets":["/alidata/www/heishi/webroot/ontheroadstore/node_modules/babel-preset-vue-app/dist/index.common.js"],"babelrc":false,"cacheDirectory":false}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/index.vue
Module not found: Error: Can't resolve '~/components/index/Banner' in '/alidata/www/heishi/webroot/ontheroadstore/pages'
@ ./node_modules/babel-loader/lib?{"presets":["/alidata/www/heishi/webroot/ontheroadstore/node_modules/babel-preset-vue-app/dist/index.common.js"],"babelrc":false,"cacheDirectory":false}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/index.vue 23:0-54
@ ./pages/index.vue
@ ./.nuxt/router.js
@ ./.nuxt/index.js
@ ./.nuxt/client.js
ERROR in ./node_modules/babel-loader/lib?{"presets":["/alidata/www/heishi/webroot/ontheroadstore/node_modules/babel-preset-vue-app/dist/index.common.js"],"babelrc":false,"cacheDirectory":false}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/index.vue
Module not found: Error: Can't resolve '~/components/index/Store' in '/alidata/www/heishi/webroot/ontheroadstore/pages'
@ ./node_modules/babel-loader/lib?{"presets":["/alidata/www/heishi/webroot/ontheroadstore/node_modules/babel-preset-vue-app/dist/index.common.js"],"babelrc":false,"cacheDirectory":false}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/index.vue 26:0-52
@ ./pages/index.vue
@ ./.nuxt/router.js
@ ./.nuxt/index.js
@ ./.nuxt/client.js
ERROR in ./node_modules/babel-loader/lib?{"presets":["/alidata/www/heishi/webroot/ontheroadstore/node_modules/babel-preset-vue-app/dist/index.common.js"],"babelrc":false,"cacheDirectory":false}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/index.vue
Module not found: Error: Can't resolve '~/components/index/Top10' in '/alidata/www/heishi/webroot/ontheroadstore/pages'
@ ./node_modules/babel-loader/lib?{"presets":["/alidata/www/heishi/webroot/ontheroadstore/node_modules/babel-preset-vue-app/dist/index.common.js"],"babelrc":false,"cacheDirectory":false}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/index.vue 27:0-52
@ ./pages/index.vue
@ ./.nuxt/router.js
@ ./.nuxt/index.js
@ ./.nuxt/client.js
ERROR in ./node_modules/babel-loader/lib?{"presets":["/alidata/www/heishi/webroot/ontheroadstore/node_modules/babel-preset-vue-app/dist/index.common.js"],"babelrc":false,"cacheDirectory":false}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/store/index.vue
Module not found: Error: Can't resolve '~/components/index/Top10' in '/alidata/www/heishi/webroot/ontheroadstore/pages/store'
@ ./node_modules/babel-loader/lib?{"presets":["/alidata/www/heishi/webroot/ontheroadstore/node_modules/babel-preset-vue-app/dist/index.common.js"],"babelrc":false,"cacheDirectory":false}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/store/index.vue 53:0-52
@ ./pages/store/index.vue
@ ./.nuxt/router.js
@ ./.nuxt/index.js
@ ./.nuxt/client.js
ERROR in ./node_modules/babel-loader/lib?{"presets":["/alidata/www/heishi/webroot/ontheroadstore/node_modules/babel-preset-vue-app/dist/index.common.js"],"babelrc":false,"cacheDirectory":false}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/store/_pages.vue
Module not found: Error: Can't resolve '~/components/index/Top10' in '/alidata/www/heishi/webroot/ontheroadstore/pages/store'
@ ./node_modules/babel-loader/lib?{"presets":["/alidata/www/heishi/webroot/ontheroadstore/node_modules/babel-preset-vue-app/dist/index.common.js"],"babelrc":false,"cacheDirectory":false}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/store/_pages.vue 57:0-52
@ ./pages/store/_pages.vue
@ ./.nuxt/router.js
@ ./.nuxt/index.js
@ ./.nuxt/client.js
ERROR in ./node_modules/babel-loader/lib?{"presets":["/alidata/www/heishi/webroot/ontheroadstore/node_modules/babel-preset-vue-app/dist/index.common.js"],"babelrc":false,"cacheDirectory":false}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/index.vue
Module not found: Error: Can't resolve '~/components/index/Video' in '/alidata/www/heishi/webroot/ontheroadstore/pages'
@ ./node_modules/babel-loader/lib?{"presets":["/alidata/www/heishi/webroot/ontheroadstore/node_modules/babel-preset-vue-app/dist/index.common.js"],"babelrc":false,"cacheDirectory":false}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/index.vue 25:0-52
@ ./pages/index.vue
@ ./.nuxt/router.js
@ ./.nuxt/index.js
@ ./.nuxt/client.js
Error: Webpack build exited with errors
at /alidata/www/heishi/webroot/ontheroadstore/node_modules/nuxt/lib/builder/builder.js:489:27
at emitRecords.err (/alidata/www/heishi/webroot/ontheroadstore/node_modules/webpack/lib/Compiler.js:269:13)
at Compiler.emitRecords (/alidata/www/heishi/webroot/ontheroadstore/node_modules/webpack/lib/Compiler.js:375:38)
at emitAssets.err (/alidata/www/heishi/webroot/ontheroadstore/node_modules/webpack/lib/Compiler.js:262:10)
at applyPluginsAsyncSeries1.err (/alidata/www/heishi/webroot/ontheroadstore/node_modules/webpack/lib/Compiler.js:368:12)
at next (/alidata/www/heishi/webroot/ontheroadstore/node_modules/tapable/lib/Tapable.js:218:11)
at Compiler.compiler.plugin (/alidata/www/heishi/webroot/ontheroadstore/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
at Compiler.applyPluginsAsyncSeries1 (/alidata/www/heishi/webroot/ontheroadstore/node_modules/tapable/lib/Tapable.js:222:13)
at Compiler.afterEmit (/alidata/www/heishi/webroot/ontheroadstore/node_modules/webpack/lib/Compiler.js:365:9)
at require.forEach.err (/alidata/www/heishi/webroot/ontheroadstore/node_modules/webpack/lib/Compiler.js:354:15)
at /alidata/www/heishi/webroot/ontheroadstore/node_modules/async/dist/async.js:421:16
at iteratorCallback (/alidata/www/heishi/webroot/ontheroadstore/node_modules/async/dist/async.js:998:13)
at /alidata/www/heishi/webroot/ontheroadstore/node_modules/async/dist/async.js:906:16
at /alidata/www/heishi/webroot/ontheroadstore/node_modules/graceful-fs/graceful-fs.js:43:10
at FSReqWrap.oncomplete (fs.js:135:15)
error Command failed with exit code 1.```
yarn dev
```ERROR Failed to compile with 7 errors 20:32:24
These dependencies were not found:
* ~/components/index/Article in ./node_modules/babel-loader/lib?{"presets":["/alidata/www/heishi/webroot/ontheroadstore/node_modules/babel-preset-vue-app/dist/index.common.js"],"babelrc":false,"cacheDirectory":true}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/index.vue
* ~/components/index/Banner in ./node_modules/babel-loader/lib?{"presets":["/alidata/www/heishi/webroot/ontheroadstore/node_modules/babel-preset-vue-app/dist/index.common.js"],"babelrc":false,"cacheDirectory":true}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/index.vue
* ~/components/index/Store in ./node_modules/babel-loader/lib?{"presets":["/alidata/www/heishi/webroot/ontheroadstore/node_modules/babel-preset-vue-app/dist/index.common.js"],"babelrc":false,"cacheDirectory":true}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/index.vue
* ~/components/index/Top10 in ./node_modules/babel-loader/lib?{"presets":["/alidata/www/heishi/webroot/ontheroadstore/node_modules/babel-preset-vue-app/dist/index.common.js"],"babelrc":false,"cacheDirectory":true}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/index.vue, ./node_modules/babel-loader/lib?{"presets":["/alidata/www/heishi/webroot/ontheroadstore/node_modules/babel-preset-vue-app/dist/index.common.js"],"babelrc":false,"cacheDirectory":true}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/store/_pages.vue and 1 other
* ~/components/index/Video in ./node_modules/babel-loader/lib?{"presets":["/alidata/www/heishi/webroot/ontheroadstore/node_modules/babel-preset-vue-app/dist/index.common.js"],"babelrc":false,"cacheDirectory":true}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/index.vue
To install them, you can run: npm install --save ~/components/index/Article ~/components/index/Banner ~/components/index/Store ~/components/index/Top10 ~/components/index/Video
<!--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/c1320">#c1320</a>)</em></sub></div>