公司的小程序项目需求更改成公众号内部接口了。前面未完成的内容稍后补上。需重新建立vue项目进行开发
一、项目搭建
参考该篇文章,采用了淘宝镜像的npm仓库,成功搭建vue项目。(公司项目没有用镜像)
二、启动项目
将项目装载(导入)到VSCode,在命令行输入npm install报错了。
尝试输入指令 npm run dev 启动项目。
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
D:\项目\eal-apps\eal-vue>npm install
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN style-loader@1.2.1 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN stylus-loader@3.0.2 requires a peer of stylus@>=0.52.4 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
up to date in 11.412s
31 packages are looking for funding
run `npm fund` for details
D:\项目\eal-apps\eal-vue>npm run dev
> eal-vue@1.0.0 dev D:\项目\eal-apps\eal-vue
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
1 1 1 1 1 1 1 14% building modules 35/45 modules 10 active ...=0!D:\项目\eal-apps\eal-vue\src\App.vue{ parser: "babylon" } is deprecated; we now treat it as { parser: "babel" }.
1 1 94% asset optimization
ERROR Failed to compile with 7 errors
These dependencies were not found:
* @/pages/works/preset/detail in ./src/router/works.js
* @/pages/works/preset/list in ./src/router/works.js
* @/pages/works/quota/detail in ./src/router/works.js
* @/pages/works/quota/list in ./src/router/works.js
* @/utils/auth in ./node_modules/babel-loader/lib!./node_modules/vue-loader/li
/node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=
To install them, you can run: npm install --save @/pages/works/preset/detail @
s/quota/list @/utils/auth
npm install警告可以忽略。本地不需要执行npm install --save,重新拉代码即可。