zoukankan      html  css  js  c++  java
  • vue-cli vue脚手架搭建步骤

    提前在E: odejs文件夹下建立node_gobal和node_cache

    并配置环境变量NODE_PATH:E: odejs ode_global ode_modules

    改变用户变量中的C:Users11872AppDataRoaming pm为 E: odejs ode_global

    打开cmd

    C:Users11872>npm config set prefix "E: odejs ode_global"

    C:Users11872>npm config set cache "E: odejs ode_cache"

    C:Users11872>npm config set registry=http://registry.npm.taobao.org

    上面三步执行完成后,到用户 C:Users你的用户名.npmrc查看是否存在上面三个指令

    接着执行

    C:Users11872>npm install webpack -g
    E: odejs ode_globalwebpack -> E: odejs ode_global ode_moduleswebpackinwebpack.js
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_moduleswebpack ode_modulesfsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

    + webpack@4.35.0
    added 324 packages from 199 contributors in 66.87s

    C:Users11872>npm install webpack-cli -g
    E: odejs ode_globalwebpack-cli -> E: odejs ode_global ode_moduleswebpack-cliincli.js
    npm WARN webpack-cli@3.3.5 requires a peer of webpack@4.x.x but none is installed. You must install peer dependencies yourself.

    + webpack-cli@3.3.5
    added 206 packages from 130 contributors in 26.024s

    C:Users11872>webpack -v
    4.35.0

    C:Users11872>npm install vue-cli -g
    npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
    E: odejs ode_globalvue -> E: odejs ode_global ode_modulesvue-cliinvue
    E: odejs ode_globalvue-init -> E: odejs ode_global ode_modulesvue-cliinvue-init
    E: odejs ode_globalvue-list -> E: odejs ode_global ode_modulesvue-cliinvue-list
    + vue-cli@2.9.6
    added 239 packages from 206 contributors in 65.166s

    C:Users11872>vue -V     检查vue-cli版本号 vue -V ,此处V为大写  

    切换到存放vue项目的盘符下

    C:Users11872>e:

    E:>cd test

    E: est>vue init webpack myvue

    ? Project name myvue
    ? Project description A Vue.js project
    ? Author 1187253007 <1187253007@qq.com>
    ? Vue build standalone
    ? Install vue-router? Yes
    ? Use ESLint to lint your code? No
    ? Set up unit tests Yes
    ? Pick a test runner jest
    ? Setup e2e tests with Nightwatch? Yes
    ? Should we run `npm install` for you after the project has been created? (recommended) npm

    vue-cli · Generated "myvue".


    # Installing project dependencies ...
    # ========================

    npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
    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 socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0

    > chromedriver@2.46.0 install E: estmyvue ode_moduleschromedriver
    > node install.js

    Current existing ChromeDriver binary is unavailable, proceding with download and extraction.
    Downloading from file: https://chromedriver.storage.googleapis.com/2.46/chromedriver_win32.zip
    Saving to file: C:Users11872AppDataLocalTemp2.46chromedriverchromedriver_win32.zip
    Received 781K...
    Received 1568K...
    Received 2352K...
    Received 3136K...
    Received 3920K...
    Received 4523K total.
    Extracting zip contents
    Copying to target path E: estmyvue ode_moduleschromedriverlibchromedriver
    Done. ChromeDriver binary available at E: estmyvue ode_moduleschromedriverlibchromedriverchromedriver.exe

    > core-js@2.6.9 postinstall E: estmyvue ode_modulescore-js
    > node scripts/postinstall || echo "ignore"

    Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

    The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
    > https://opencollective.com/core-js
    > https://www.patreon.com/zloirock

    Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


    > uglifyjs-webpack-plugin@0.4.6 postinstall E: estmyvue ode_moduleswebpack ode_modulesuglifyjs-webpack-plugin
    > node lib/post_install.js

    npm notice created a lockfile as package-lock.json. You should commit this file.
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modulesfsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

    added 1521 packages from 1065 contributors and audited 31308 packages in 335.245s
    found 84 vulnerabilities (65 low, 8 moderate, 10 high, 1 critical)
    run `npm audit fix` to fix them, or `npm audit` for details

    # Project initialization finished!
    # ========================

    To get started:

    cd myvue
    npm run dev

    Documentation can be found at https://vuejs-templates.github.io/webpack

    E: est>cd myvue

    E: estmyvue>npm run dev

    > myvue@1.0.0 dev E: estmyvue
    > webpack-dev-server --inline --progress --config build/webpack.dev.conf.js

    12% building modules 19/27 modules 8 active ...ate&index=0!E: estmyvuesrcApp.vue{ parser: "babylon" } is deprecated; we now treat it as { parser: "bab 95% emitting

    DONE Compiled successfully in 3785ms 6:17:03 PM

    I Your application is running here: http://localhost:8080

  • 相关阅读:
    改造vant日期选择
    css3元素垂直居中
    npm综合
    (转)网页加水印方法
    Mac下IDEA自带MAVEN插件的全局环境配置
    隐藏注册控件窗口
    High performance optimization and acceleration for randomWalk, deepwalk, node2vec (Python)
    How to add conda env into jupyter notebook installed by pip
    The Power of WordNet and How to Use It in Python
    背单词app测评,2018年
  • 原文地址:https://www.cnblogs.com/littleboyck/p/11078715.html
Copyright © 2011-2022 走看看