请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

最后打包上线的问题

{
  "name": "website",
  "version": "1.0.0",
  "description": "Nuxt.js project",
  "author": "minzhang <569835014@qq.com>",
  "private": true,
  "scripts": {
    "dev": "nodemon -w ./server -w ./start.js --exec node ./start.js",
    "build": "nuxt build && backpack build",
    "start": "cross-env NODE_ENV=production node build/main.js",
    "precommit": "npm run lint",
    "lint": "eslint --ext .js,.vue --ignore-path .gitignore ."
  },
  "dependencies": {
    "axios": "^0.17.1",
    "bcryptjs": "^2.4.3",
    "cross-env": "^5.0.1",
    "flex.css": "^1.1.7",
    "gulp": "^3.9.1",
    "iview": "^3.1.3",
    "koa": "^2.3.0",
    "koa-body": "^2.5.0",
    "koa-bodyparser": "^4.2.0",
    "koa-multer": "^1.0.2",
    "koa-router": "^7.2.1",
    "koa-session": "^5.5.0",
    "koa-static-server": "^1.3.4",
    "koa2-cors": "^2.0.3",
    "lodash": "^4.17.4",
    "normalize.css": "^8.0.0",
    "nuxt": "^1.0.0-rc3",
    "ramda": "^0.25.0",
    "reset.css": "^2.0.2",
    "source-map-support": "^0.4.15",
    "svg-captcha": "^1.3.11",
    "tinymce": "^4.7.4",
    "vuetify": "^0.17.3",
    "vuex": "^3.0.1"
  },
  "devDependencies": {
    "babel": "^6.23.0",
    "babel-eslint": "^7.1.1",
    "babel-loader": "^7.1.2",
    "babel-plugin-module-alias": "^1.6.0",
    "babel-plugin-transform-decorators": "^6.24.1",
    "babel-plugin-transform-decorators-legacy": "^1.3.4",
    "babel-preset-latest-node": "^0.2.2",
    "babel-preset-stage-3": "^6.24.1",
    "eslint": "^3.13.1",
    "eslint-config-standard": "^10.2.1",
    "eslint-plugin-html": "^2.0.3",
    "eslint-plugin-import": "^2.2.0",
    "eslint-plugin-node": "^4.2.2",
    "eslint-plugin-promise": "^3.4.0",
    "eslint-plugin-standard": "^3.0.1",
    "less": "^2.7.3",
    "less-loader": "^4.0.5",
    "nodemon": "^1.11.0",
    "scmp": "^2.0.0",
    "stylus": "^0.54.5",
    "stylus-loader": "^3.0.1"
  }
}

运行npm run build 的时候会出现图片描述
如何解决?

正在回答

3回答

如果是这个版本,可以把 backpack build 去掉,只保留 nuxt build 就可以了。


另外如果 nuxt 升级到了 2.1.0 的话,需 npm i pug-plain-loader webpack 安装下依赖,再执行 npm run build 应该就可以了

0 回复 有任何疑惑可以回复我~
Scott 2018-10-16 09:20:28

现在是打包编译都可以,但是部署不成功对吧,部署有报什么错误没

0 回复 有任何疑惑可以回复我~
  • 提问者 qq_万分之一_0 #1
    build完后没有build文件夹,start直接报错
    回复 有任何疑惑可以回复我~ 2018-10-16 15:35:36
  • 提问者 qq_万分之一_0 #2
    添加依赖以后可以打包了
    回复 有任何疑惑可以回复我~ 2018-10-17 14:36:12
提问者 qq_万分之一_0 2018-10-12 10:56:37

把后面的去掉,然后部署dist就可以了吗?

0 回复 有任何疑惑可以回复我~
  • Scott #1
    对,你可以尝试一下
    回复 有任何疑惑可以回复我~ 2018-10-15 08:44:23
  • 提问者 qq_万分之一_0 回复 Scott #2
    dist目录怎么跑起来好像不行啊老师
    回复 有任何疑惑可以回复我~ 2018-10-15 13:42:52
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信