Git Product home page Git Product logo

Comments (11)

WanderWang avatar WanderWang commented on June 3, 2024

请您在命令行中执行一下 cnpm view @egret/egret3d --json,并将输出结果告诉我

from egret3d.

yaoGreat avatar yaoGreat commented on June 3, 2024

好,执行结果如下:
{
"_id": "@egret/[email protected]",
"_rev": "16866074",
"name": "@egret/egret3d",
"description": "egret 3d lib",
"dist-tags": {
"latest": "0.8.0"
},
"maintainers": [
"egret-engine [email protected]",
"wanderwang [email protected]"
],
"time": {
"modified": "2018-05-25T11:10:17.000Z",
"created": "2018-05-11T07:07:58.773Z",
"0.8.0": "2018-05-25T11:10:07.919Z",
"0.0.5": "2018-05-25T09:45:38.803Z",
"0.0.4": "2018-05-25T05:56:09.712Z",
"0.0.3": "2018-05-24T15:38:09.825Z",
"0.0.2": "2018-05-11T07:25:16.586Z",
"0.0.1": "2018-05-11T07:07:58.773Z"
},
"users": {},
"author": "egret",
"versions": [
"0.0.1",
"0.0.2",
"0.0.3",
"0.0.4",
"0.0.5",
"0.8.0"
],
"_attachments": {},
"license": "ISC",
"version": "0.8.0",
"compilerVersion": "5.3.0",
"main": "bin/egret3d.js",
"bin": {
"egret3d": "cli/lib/index.js"
},
"scripts": {
"build": "egret build && node script/report.js",
"build-shader": "node script/shaderCompiler.js"
},
"devDependencies": {},
"gitHead": "eb287bdcec27ecf6160a3166d2cdd5423f489f4b",
"_npmVersion": "6.0.1",
"_nodeVersion": "8.1.3",
"_npmUser": "wanderwang [email protected]",
"dist": {
"shasum": "bf7d708d587cb406ebd211b6211ed217b92875e0",
"size": 246252,
"noattachment": false,
"tarball": "http://registry.npm.taobao.org/@egret/egret3d/download/@egret/egret3d-0.8.0.tgz"
},
"directories": {},
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/egret3d_0.8.0_1527246607721_0.15457919264763076"
},
"_hasShrinkwrap": false,
"publish_time": 1527246607919,
"_cnpm_publish_time": 1527246607919
}

from egret3d.

WanderWang avatar WanderWang commented on June 3, 2024

看起来没有问题,请您打开 C:\Users\Administrator\AppData\Roaming\npm\node_modules@egret\paper-cli\lib\install.js 这个文件的第77行,在执行 JSON.parse 之前输出一下 result,把结果告诉我,谢谢

from egret3d.

yaoGreat avatar yaoGreat commented on June 3, 2024

我增加的代码:
case 1:
result = _a.sent();
console.log(result); // 这句话
config = JSON.parse(result);
return [4 /yield/, download_1.default(config.tarball)];

输出结果:
{
"shasum": "bf7d708d587cb406ebd211b6211ed217b92875e0",
"size": 246252,
"noattachment": false,
"tarball": "http://registry.npm.taobao.org/@egret/egret3d/download/@egret/egret3d-0.8.0.tgz"
}

SyntaxError: Unexpected token d in JSON at position 2
at JSON.parse ()
at Object. (C:\Users\Administrator\AppData\Roaming\npm\node_modules@egret\paper-cli\lib\install.js:78:35)
at step (C:\Users\Administrator\AppData\Roaming\npm\node_modules@egret\paper-cli\lib\install.js:32:23)
at Object.next (C:\Users\Administrator\AppData\Roaming\npm\node_modules@egret\paper-cli\lib\install.js:13:53)
at fulfilled (C:\Users\Administrator\AppData\Roaming\npm\node_modules@egret\paper-cli\lib\install.js:4:58)
at

from egret3d.

WanderWang avatar WanderWang commented on June 3, 2024

这看起来就有点奇怪了....这个输出结果难道不是一个JSON么.....

from egret3d.

WanderWang avatar WanderWang commented on June 3, 2024

这个问题可能是字节流编码格式导致的,我修改一下此处逻辑,不再使用子进程获取标准输出流的方式

from egret3d.

WanderWang avatar WanderWang commented on June 3, 2024

我刚才更新了一个新版本,请您重新执行 cnpm install @egret/paper-cli -g 安装,确认版本号为 1.0.4,这个版本应该解决了这个问题,期待您的反馈

from egret3d.

yaoGreat avatar yaoGreat commented on June 3, 2024

辛苦了!
我按照命令更新了版本,不过版本号还是1.0.3,而且错误仍然存在。
我也尝试了使用“cnpm uninstall @egret/paper-cli”卸载后重新安装,版本号还是不变。
更新的过程中有什么问题呢?

d:\MyDev\Egret\test3d>cnpm install @egret/paper-cli -g
Downloading @egret/paper-cli to C:\Users\Administrator\AppData\Roaming\npm\node_modules@egret\paper-cli_tmp
Copying C:\Users\Administrator\AppData\Roaming\npm\node_modules@egret\paper-cli_tmp_@[email protected]@@egret\paper-cli to C:\Users\Administrator\AppData
Roaming\npm\node_modules@egret\paper-cli
Installing @egret/paper-cli's dependencies to C:\Users\Administrator\AppData\Roaming\npm\node_modules@egret\paper-cli/node_modules
[1/5] tar@^4.4.2 installed at node_modules_tar@4.4.4@tar
[2/5] fs-extra-promise@^1.0.1 installed at node_modules_fs-extra-promise@1.0.1@fs-extra-promise
[3/5] glob@^7.1.2 installed at node_modules_glob@7.1.2@glob
[4/5] args@^3.0.8 installed at node_modules_args@3.0.8@args
[5/5] download@^7.0.0 installed at node_modules_download@7.0.0@download
Recently updated (since 2018-05-22): 2 packages (detail see file C:\Users\Administrator\AppData\Roaming\npm\node_modules@egret\paper-cli\node_modules.recently
_updates.txt)
2018-05-25
→ tar@^4.4.2(4.4.4) (08:58:46)
2018-05-23
[email protected] › minipass@^2.3.3(2.3.3) (02:59:35)
All packages installed (139 packages installed from npm registry, used 35s, speed 67.65kB/s, json 131(860.81kB), tarball 1.45MB)
[@egret/[email protected]] link C:\Users\Administrator\AppData\Roaming\npm\paper@ -> C:\Users\Administrator\AppData\Roaming\npm\node_modules@egret\paper-cli\lib
index.js

d:\MyDev\Egret\test3d>paper --version
1.0.3

from egret3d.

WanderWang avatar WanderWang commented on June 3, 2024

我看了一下,是 npm pulbish 命令出了一些问题,1.0.4没有正确的发布上去,请稍等我解决这个问题

from egret3d.

WanderWang avatar WanderWang commented on June 3, 2024

问题应该解决了,现在是1.0.4了,请再试一次 @yaoGreat

from egret3d.

yaoGreat avatar yaoGreat commented on June 3, 2024

抱歉,现在才回复你~
更新成功了,而且使用
paper install egret3d
时没有任何输出,应该是成功了
后续demo运行也成功
多谢,辛苦了!

from egret3d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.