美文网首页
npm install异常:npm ERR! Unexpecte

npm install异常:npm ERR! Unexpecte

作者: hphua | 来源:发表于2018-02-23 10:39 被阅读0次

    问题表现

    D:\Project\HB\Code\H5\工程模板\trunk\HBAppTemplate>npm install
    npm WARN deprecated babel-preset-es2015@6.24.1: ????  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
    npm WARN deprecated connect@2.3.9: connect 2.x series is deprecated
    npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
    npm WARN deprecated constantinople@3.0.2: Please update to at least constantinople 3.1.1
    npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer
    npm ERR! Unexpected end of JSON input while parsing near '...ugin-transform-es2015'
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\Thinkpad\AppData\Roaming\npm-cache\_logs\2018-02-23T02_24_12_107Z-debug.log
    

    处理方法

    执行npm cache clean --force就可以解决。
    eg:

    D:\Project\HB\Code\H5\工程模板\trunk\HBAppTemplate>npm cache clean --force
    npm WARN using --force I sure hope you know what you are doing.
    
    D:\Project\HB\Code\H5\工程模板\trunk\HBAppTemplate>
    D:\Project\HB\Code\H5\工程模板\trunk\HBAppTemplate>npm install
    npm WARN deprecated babel-preset-es2015@6.24.1: ????  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
    npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
    npm WARN deprecated connect@2.3.9: connect 2.x series is deprecated
    npm WARN deprecated constantinople@3.0.2: Please update to at least constantinople 3.1.1
    npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer
    
    > uws@9.14.0 install D:\Project\HB\Code\H5\工程模板\trunk\HBAppTemplate\node_modules\uws
    > node-gyp rebuild > build_log.txt 2>&1 || exit 0
    
    npm notice created a lockfile as package-lock.json. You should commit this file.
    npm WARN HBSurveyor@1.0.0 No repository field.
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
    
    added 871 packages in 104.154s
    

    相关文章

      网友评论

          本文标题:npm install异常:npm ERR! Unexpecte

          本文链接:https://www.haomeiwen.com/subject/idntxftx.html