账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    win10创建mpvue快速模板一直出问题
    57
    0

    在npm install 的时候一直提示这些错误:

    npm WARN deprecated bfj-node4@5.3.1: Switch to the bfj package for fixes and new features!
    npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
    npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js

    uglifyjs-webpack-plugin@0.4.6 postinstall E:gitmpvuemptestnode_moduleswebpacknode_modulesuglifyjs-webpack-plugin
    node lib/post_install.js

    npm WARN rollback Rolling back node-pre-gyp@0.10.0 failed (this is probably harmless): EPERM: operation not permitted, lstat 'E:gitmpvuemptestnode_modulesfseventsnode_modules'
    npm notice created a lockfile as package-lock.json. You should commit this file.
    npm WARN vue-loader@13.7.2 requires a peer of vue-template-compiler@^2.0.0 but none is installed. You must install peer dependencies yourself.

    运行小程序的时候问题也不大,就是pages里新增加的页面main.json的page不会自动更新了。

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 残留的躯壳 普通会员 1楼

      在Windows 10上创建MPVue快速模板可能会遇到一些问题。以下是一些可能的原因和解决方案:

      1. 缺少安装依赖:确保你已经安装了MPVue的所有依赖。你可以通过运行以下命令来查看它们:

      npm list

      如果你没有安装任何依赖,你可能会看到缺少以下项:

      vue@2.6.13 vue-router@3.2.0

      然后,你需要安装这些依赖。你可以通过运行以下命令来安装它们:

      npm install vue vue-router

      1. 缺少编译选项:确保你已经启用了编译选项。你可以通过运行以下命令来启用编译选项:

      vue serve --open --host 0.0.0.0

      如果你没有启用了编译选项,你可能会看到缺少以下项:

      vue serve

      然后,你需要启用编译选项。你可以通过运行以下命令来启用编译选项:

      vue serve --open --host 0.0.0.0 --open-standalone

      1. 缺少模板引擎:确保你已经启用了模板引擎。你可以通过运行以下命令来启用模板引擎:

      vue serve --open --host 0.0.0.0 --open-standalone --template engine vue

      如果你没有启用了模板引擎,你可能会看到缺少以下项:

      vue serve --open --host 0.0.0.0 --open-standalone --template engine vue

      1. 问题与浏览器:如果你使用的是Chrome或Firefox浏览器,你可能需要确保你已经启用了JavaScript扩展。你可以通过运行以下命令来启用JavaScript扩展:

      chrome --headless --disable-gpu --disable-set-memory-size --disable-exit-on-error --disable-dev-shm-usage --disable-wasm-v8-url-guest --disable-blink --disable-set-top-level-web-security --disable-accelerometer

      如果你没有启用了JavaScript扩展,你可能会看到缺少以下项:

      chrome --headless --disable-gpu --disable-set-memory-size --disable-exit-on-error --disable-dev-shm-usage --disable-wasm-v8-url-guest --disable-blink --disable-set-top-level-web-security --disable-accelerometer

      1. 问题与代码编辑器:如果你使用的是VSCode或Atom等代码编辑器,你可能需要确保你已经启用了Node.js插件。你可以通过运行以下命令来启用Node.js插件:

      node --version

      如果你没有启用了Node.js插件,你可能会看到缺少以下项:

      node --version

      然后,你需要启用Node.js插件。你可以通过运行以下命令来启用Node.js插件:

      node --version

      以上是一些可能的原因和解决方案。如果你仍然遇到问题,建议你查看MPVue的官方文档或者寻求其他开发者的帮助。

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部