Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wepy安装成功,使用wepy new 命令创建项目 最后报错 #407

Closed
coolkiller007 opened this issue Sep 26, 2017 · 14 comments
Closed

Comments

@coolkiller007
Copy link

npm ERR! Unexpected end of input at 1:17687
npm ERR! 2.0.3","mocha":"^2.2.5"},"directories":{},"dist":{"shasum":"426222f9a
npm ERR! ^

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2017-09-26T06_46_32_015Z-debug.log
[14:46:32] [错误] 安装依赖出错

@xiyangjun
Copy link

遇到同样的问题Node版本v8.1.3 wepy@v1.5.9-1

@hao-li
Copy link

hao-li commented Sep 29, 2017

类似问题

npm ERR! Unexpected end of JSON input while parsing near '...abel-code-frame":"^6.'
tool version
node v8.6.0
npm 5.4.2
wepy v1.5.7

@Gcaufy
Copy link
Collaborator

Gcaufy commented Sep 29, 2017

@940490034 @xiaomingplus @hao-li 执行哪个命令时出错?

@hao-li
Copy link

hao-li commented Sep 29, 2017

@Gcaufy

wepy new myproject
[14:35:42] [创建] 目录:myproject
[14:35:42] [写入] 配置: package.json
[14:35:42] [拷贝] 文件: .editorconfig
[14:35:42] [拷贝] 文件: .eslintignore
[14:35:42] [拷贝] 文件: .eslintrc.js
[14:35:42] [拷贝] 文件: .npmignore
[14:35:42] [拷贝] 文件: package.json
[14:35:42] [拷贝] 文件: src/app.wpy
[14:35:42] [拷贝] 文件: src/components/counter.wpy
[14:35:42] [拷贝] 文件: src/components/group.wpy
[14:35:42] [拷贝] 文件: src/components/groupitem.wpy
[14:35:42] [拷贝] 文件: src/components/list.wpy
[14:35:42] [拷贝] 文件: src/components/panel.wpy
[14:35:42] [拷贝] 文件: src/index.template.html
[14:35:42] [拷贝] 文件: src/mixins/test.js
[14:35:42] [拷贝] 文件: src/pages/index.wpy
[14:35:42] [拷贝] 文件: wepy.config.js
[14:35:42] [执行] 执行命令: npm install --save wepy wepy-com-toast wepy-async-function
[14:35:42] [执行] 执行命令: npm install --save-dev wepy-compiler-babel babel-plugin-transform-decorators-legacy babel-plugin-syntax-export-extensions babel-plugin-transform-export-extensions babel-preset-es2015 wepy-compiler-less babel-preset-stage-1 cross-env eslint@3.18.0 babel-eslint@7.2.1 eslint-config-standard@7.1.0 eslint-friendly-formatter@2.0.7 eslint-plugin-html@2.0.1 eslint-plugin-promise@3.5.0 eslint-plugin-standard@2.0.1 wepy-eslint
[14:35:42] [信息] 可能需要几分钟, 请耐心等待...
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN test@1.2.8 No description
npm WARN test@1.2.8 No repository field.

+ wepy-async-function@1.4.4
+ wepy@1.5.8
+ wepy-com-toast@1.0.2
added 5 packages in 40.391s
npm WARN deprecated babel-preset-es2015@6.24.1: We're super 😸  excited that you're trying to use ES2015 syntax, but instead of continuing yearly presets 😭 , we recommend using babel-preset-env: npm install babel-preset-env. preset-env without options will compile ES2015+ down to ES5. And by targeting specific browsers, Babel can do less work and you can ship native ES2015+ to users 😎 ! Also, we are in the process of releasing v7, so give http://babeljs.io/blog/2017/09/12/planning-for-7.0 a read and test it! Thanks so much for using Babel 🙏 , please give us a follow @babeljs for updates, join slack.babeljs.io for discussion and help support at opencollective.com/babel
npm ERR! Unexpected end of JSON input while parsing near '...abel-code-frame":"^6.'

@coolkiller007
Copy link
Author

@Gcaufy win10系统 ,node版本 v8.4.0 ,npm版本 v5.3.0 ,wepy版本 v1.5.9-1 。
在执行 wepy new(新建项目)命令创建项目的时候,最后提示报错。
详细如下:
C:\Users\Administrator\Desktop\v3>wepy new demo
[15:10:16] [创建] 目录:demo
[15:10:16] [写入] 配置: package.json
[15:10:16] [拷贝] 文件: .editorconfig
[15:10:16] [拷贝] 文件: .eslintignore
[15:10:16] [拷贝] 文件: .eslintrc.js
[15:10:16] [拷贝] 文件: .npmignore
[15:10:16] [拷贝] 文件: .wepyignore
[15:10:16] [拷贝] 文件: src\app.wpy
[15:10:16] [拷贝] 文件: src\components\counter.wpy
[15:10:16] [拷贝] 文件: src\components\group.wpy
[15:10:16] [拷贝] 文件: src\components\groupitem.wpy
[15:10:16] [拷贝] 文件: src\components\list.wpy
[15:10:16] [拷贝] 文件: src\components\panel.wpy
[15:10:16] [拷贝] 文件: src\index.template.html
[15:10:16] [拷贝] 文件: src\mixins\test.js
[15:10:16] [拷贝] 文件: src\pages\index.wpy
[15:10:16] [拷贝] 文件: wepy.config.js
[15:10:16] [执行] 执行命令: npm install --save wepy wepy-com-toast wepy-async-function
[15:10:16] [执行] 执行命令: npm install --save-dev wepy-compiler-babel babel-plugin-transform-decorators-legacy babel-plugin-syntax-export-extensions babel-plugin-transform-export-extensions babel-preset-es2015 wepy-compiler-less babel-preset-stage-1 cross-env eslint@3.18.0 babel-eslint@7.2.1 eslint-config-standard@7.1.0 eslint-friendly-formatter@2.0.7 eslint-plugin-html@2.0.1 eslint-plugin-promise@3.5.0 eslint-plugin-standard@2.0.1 wepy-eslint
[15:10:16] [信息] 可能需要几分钟, 请耐心等待...
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN demo@1.2.8 No description
npm WARN demo@1.2.8 No repository field.

  • wepy@1.5.8
  • wepy-async-function@1.4.4
  • wepy-com-toast@1.0.2
    added 5 packages in 6.832s
    npm WARN deprecated babel-preset-es2015@6.24.1: We're super 😸 excited that you're trying to use ES2015 syntax, but instead of continuing yearly presets 😭 , we recommend using babel-preset-env: npm install babel-preset-env. preset-env without options will compile ES2015+ down to ES5. And by targeting specific browsers, Babel can do less work and you can ship native ES2015+ to users 😎 ! Also, we are in the process of releasing v7, so give http://babeljs.io/blog/2017/09/12/planning-for-7.0 a read and test it! Thanks so much for using Babel 🙏 , please give us a follow @babeljs for updates, join slack.babeljs.io for discussion and help support at opencollective.com/babel
    npm ERR! Unexpected end of input at 1:25397
    npm ERR! grunt":"0.4.x","grunt-livescript":"0.5.x","grunt-contrib-uglify":"0.9
    npm ERR! ^

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2017-09-29T07_12_48_242Z-debug.log
[15:12:48] [错误] 安装依赖出错

@Gcaufy
Copy link
Collaborator

Gcaufy commented Sep 29, 2017

#412

Gcaufy added a commit that referenced this issue Sep 29, 2017
@Gcaufy
Copy link
Collaborator

Gcaufy commented Sep 29, 2017

@940490034 @xiaomingplus @hao-li

试试

npm install wepy-cli@1.5.9-2

@hao-li
Copy link

hao-li commented Sep 30, 2017

@Gcaufy 貌似不行

npm install wepy-cli@1.5.9-2 -g
/usr/local/bin/wepy -> /usr/local/lib/node_modules/wepy-cli/bin/wepy.js
+ wepy-cli@1.5.9-2
removed 2 packages and updated 137 packages in 243.229s
wepy new myproject
[08:01:56] [创建] 目录:myproject
[08:01:56] [写入] 配置: package.json
[08:01:56] [拷贝] 文件: .editorconfig
[08:01:56] [拷贝] 文件: .eslintignore
[08:01:56] [拷贝] 文件: .eslintrc.js
[08:01:56] [拷贝] 文件: .npmignore
[08:01:56] [拷贝] 文件: .wepyignore
[08:01:56] [拷贝] 文件: src/app.wpy
[08:01:56] [拷贝] 文件: src/components/counter.wpy
[08:01:56] [拷贝] 文件: src/components/group.wpy
[08:01:56] [拷贝] 文件: src/components/groupitem.wpy
[08:01:56] [拷贝] 文件: src/components/list.wpy
[08:01:56] [拷贝] 文件: src/components/panel.wpy
[08:01:56] [拷贝] 文件: src/index.template.html
[08:01:56] [拷贝] 文件: src/mixins/test.js
[08:01:56] [拷贝] 文件: src/pages/index.wpy
[08:01:56] [拷贝] 文件: wepy.config.js
[08:01:56] [执行] 执行命令: npm install --save wepy wepy-com-toast wepy-async-function
[08:01:56] [执行] 执行命令: npm install --save-dev wepy-compiler-babel babel-plugin-transform-decorators-legacy babel-plugin-syntax-export-extensions babel-plugin-transform-export-extensions babel-plugin-transform-class-properties babel-preset-env wepy-compiler-less cross-env eslint@3.18.0 babel-eslint@7.2.1 eslint-config-standard@7.1.0 eslint-friendly-formatter@2.0.7 eslint-plugin-html@2.0.1 eslint-plugin-promise@3.5.0 eslint-plugin-standard@2.0.1 wepy-eslint
[08:01:56] [信息] 可能需要几分钟, 请耐心等待...
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN myproject@1.2.8 No description
npm WARN myproject@1.2.8 No repository field.

+ wepy-com-toast@1.0.2
+ wepy@1.5.8
+ wepy-async-function@1.4.4
added 5 packages in 2.533s
npm ERR! Unexpected end of JSON input while parsing near '...abel-code-frame":"^6.'

npm ERR! A complete log of this run can be found in:

@coolkiller007
Copy link
Author

@Gcaufy 不行
C:\Users\Administrator\Desktop\v3>wepy new demo
[09:48:50] [创建] 目录:demo
[09:48:50] [写入] 配置: package.json
[09:48:50] [拷贝] 文件: .editorconfig
[09:48:50] [拷贝] 文件: .eslintignore
[09:48:50] [拷贝] 文件: .eslintrc.js
[09:48:50] [拷贝] 文件: .npmignore
[09:48:50] [拷贝] 文件: .wepyignore
[09:48:50] [拷贝] 文件: src\app.wpy
[09:48:50] [拷贝] 文件: src\components\counter.wpy
[09:48:50] [拷贝] 文件: src\components\group.wpy
[09:48:50] [拷贝] 文件: src\components\groupitem.wpy
[09:48:50] [拷贝] 文件: src\components\list.wpy
[09:48:50] [拷贝] 文件: src\components\panel.wpy
[09:48:50] [拷贝] 文件: src\index.template.html
[09:48:50] [拷贝] 文件: src\mixins\test.js
[09:48:50] [拷贝] 文件: src\pages\index.wpy
[09:48:50] [拷贝] 文件: wepy.config.js
[09:48:50] [执行] 执行命令: npm install --save wepy wepy-com-toast wepy-async-function
[09:48:50] [执行] 执行命令: npm install --save-dev wepy-compiler-babel babel-plugin-transform-decorators-legacy babel-plugin-syntax-export-extensions babel-plugin-transform-export-extensions babel-plugin-transform-class-properties babel-preset-env wepy-compiler-less cross-env eslint@3.18.0 babel-eslint@7.2.1 eslint-config-standard@7.1.0 eslint-friendly-formatter@2.0.7 eslint-plugin-html@2.0.1 eslint-plugin-promise@3.5.0 eslint-plugin-standard@2.0.1 wepy-eslint
[09:48:50] [信息] 可能需要几分钟, 请耐心等待...
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN demo@1.2.8 No description
npm WARN demo@1.2.8 No repository field.

  • wepy@1.5.8
  • wepy-async-function@1.4.4
  • wepy-com-toast@1.0.2
    added 5 packages in 3.739s

npm ERR! Unexpected end of input at 1:25397
npm ERR! grunt":"0.4.x","grunt-livescript":"0.5.x","grunt-contrib-uglify":"0.9
npm ERR! ^

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2017-09-30T01_49_31_274Z-debug.log
[09:49:31] [错误] 安装依赖出错

@Gcaufy
Copy link
Collaborator

Gcaufy commented Sep 30, 2017

我将node和npm都更新到最新版本。还是无法重现这个问题

tool version
node v8.6.0
npm v5.4.2
wepy v1.5.9-2

@Gcaufy
Copy link
Collaborator

Gcaufy commented Sep 30, 2017

@940490034 尝试一下

npm cache clean --force

@DWangHua
Copy link

刚测试了下,nvm 安装了最新node 8.6.0 安装wepy-cli 1.5.9-2, 初始化项目ok

@hao-li
Copy link

hao-li commented Sep 30, 2017

@Gcaufy 又试了几遍,终于成功了,感谢;)

@Gcaufy Gcaufy closed this as completed Oct 10, 2017
@Gcaufy
Copy link
Collaborator

Gcaufy commented Oct 24, 2017

#462

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants