{ "name": "vue-music", "version": "1.0.0", "description": "Music player", "author": "Jason <jsonwu@qq.com>", "private": true, "scripts": { "dev": "node build/dev-server.js", "start": "node build/dev-server.js", "build": "node build/build.js", "lint": "eslint --ext .js,.vue src" }, "dependencies": { "babel-runtime": "^6.0.0", "vue": "^2.2.6", "vue-router": "^2.3.1", "fastclick": "^1.0.6", "vue-lazyload": "1.0.3", "axios": "^0.16.1", "jsonp": "0.2.1", "better-scroll": "^0.1.15" }, "devDependencies": { "autoprefixer": "^6.7.2", "babel-core": "^6.22.1", "babel-eslint": "^7.1.1", "babel-loader": "^6.2.10", "babel-plugin-transform-runtime": "^6.22.0", "babel-preset-env": "^1.3.2", "babel-preset-stage-2": "^6.22.0", "babel-register": "^6.22.0", "babel-polyfill": "^6.2.0", "chalk": "^1.1.3", "connect-history-api-fallback": "^1.3.0", "copy-webpack-plugin": "^4.0.1", "css-loader": "^0.28.0", "eslint": "^3.19.0", "eslint-friendly-formatter": "^2.0.7", "eslint-loader": "^1.7.1", "eslint-plugin-html": "^2.0.0", "eslint-config-standard": "^6.2.1", "eslint-plugin-promise": "^3.4.0", "eslint-plugin-standard": "^2.0.1", "eventsource-polyfill": "^0.9.6", "express": "^4.14.1", "extract-text-webpack-plugin": "^2.0.0", "file-loader": "^0.11.1", "friendly-errors-webpack-plugin": "^1.1.3", "html-webpack-plugin": "^2.28.0", "http-proxy-middleware": "^0.17.3", "webpack-bundle-analyzer": "^2.2.1", "semver": "^5.3.0", "shelljs": "^0.7.6", "opn": "^4.0.2", "optimize-css-assets-webpack-plugin": "^1.3.0", "ora": "^1.2.0", "rimraf": "^2.6.0", "url-loader": "^0.5.8", "vue-loader": "^11.3.4", "vue-style-loader": "^2.0.5", "vue-template-compiler": "^2.2.6", "webpack": "^2.3.3", "webpack-dev-middleware": "^1.10.0", "webpack-hot-middleware": "^2.18.0", "webpack-merge": "^4.1.0", "stylus": "^0.54.5", "stylus-loader": "^2.1.1" }, "engines": { "node": ">= 4.0.0", "npm": ">= 3.0.0" }, "browserslist": [ "> 1%", "last 2 versions", "not ie <= 8" ] }
这是package.json,已经参考了老师源码,但是运行时还是报错:
ERROR Failed to compile with 5 errors 10:08:58 These dependencies were not found: * api/recommend in ./~/babel-loader/lib!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/recommend/recommend.vue * api/config in ./~/babel-loader/lib!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/recommend/recommend.vue * base/slider/slider in ./~/babel-loader/lib!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/recommend/recommend.vue * base/loading/loading in ./~/babel-loader/lib!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/recommend/recommend.vue * base/scroll/scroll in ./~/babel-loader/lib!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/recommend/recommend.vue To install them, you can run: npm install --save api/recommend api/config base/slider/slider base/loading/loading base/scroll/scroll
按照提示去安装依赖,结果又报错提示:
npm ERR! code ENOLOCAL npm ERR! Could not install from "base\slider\slider" as it does not contain a package.json file. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\F1332441\AppData\Roaming\npm-cache\_logs\2018-04-03T02_38_38_300Z-debug.log
请问老师,这要怎样解决?