zoukankan      html  css  js  c++  java
  • vue 热更新内存溢出

    就是保存时会出错

    > node –max_old_space_size=4096 webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
    
    module.js:549
        throw err;
        ^
    
    Error: Cannot find module 'F:work路径路径vue–max_old_space_size=4096'
        at Function.Module._resolveFilename (module.js:547:15)
        at Function.Module._load (module.js:474:25)
        at Function.Module.runMain (module.js:693:10)
        at startup (bootstrap_node.js:188:16)
        at bootstrap_node.js:609:3
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! house-vue@1.0.0 dev: `node –max_old_space_size=4096 webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the house-vue@1.0.0 dev script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     D:Program Files
    odejsX64
    ode_cache\_logs2018-09-04T07_52_06_975Z-debug.log

    解决方法:

    windows 下的 vue 项目可以找到以下路径

    ./node_modules/.bin/webpack-dev-server.cmd

    添加  --max-old-space-size=4096

    @IF EXIST "%~dp0
    ode.exe" (
      "%~dp0
    ode.exe"  "%~dp0..webpack-dev-serverinwebpack-dev-server.js" %*
    ) ELSE (
      @SETLOCAL
      @SET PATHEXT=%PATHEXT:;.JS;=;%
      node  --max-old-space-size=4096 "%~dp0..webpack-dev-serverinwebpack-dev-server.js" %*
    )
  • 相关阅读:
    多边形游戏
    大整数乘法
    矩阵连乘
    最长公共子序列
    动态规划
    快速排序
    二分搜索技术
    动态规划基本要素
    合并排序
    最大子段和
  • 原文地址:https://www.cnblogs.com/amang/p/9585008.html
Copyright © 2011-2022 走看看