-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
iceworks 3.0.1 运行 idev generate 报错:[ice-devtools] StatusCodeError:404 #2631
Comments
@jdh 看起来是某个物料没有发 (t)npm,generate 前要保证物料先发布到 (t)npm |
经过检查,确实是generate时出现的问题 —— 发布了npm却没有生成screenshot.png。 问题定位: 整个物料是通过 idev init生成的, components/ExampleComponent/package.json 里没有配置名为screenshot 的 scripts,加上就好了。 |
@jdh 跟 screenshot 的 scripts 没关系吧,重点是 ExampleComponent 要先发布到 npm |
|
@jdh 应该有更详细的日志,能看到有个 url 无法访问我记得 |
通过日志发现会去 https://registry.npm.taobao.org/test2-materilas-example-scaffold 找包,看了文档有个环境变量设置,在物料根目录添加.env文件,内容为: 再跑:idev generate 就好了 建议在初始化物料时把这个文件加上
|
哦 那我理解了,因为包是发布到 npm 官方源,但是 generate 查找时默认使用 taobao 源(国内用户快一些),taobao 源是定时同步的,所以出现这个问题了。 |
是的,就是这个问题。 |
[ice-devtools] StatusCodeError:404 - "{"error":"[not_found] document not found","reason":"[not_found] document not found"}"
{ StatusCodeError: 404 - "{"error":"[not_found] document not found","reason":"[not_found] document not found"}"
at new StatusCodeError (/usr/local/Cellar/node/11.6.0/lib/node_modules/ice-devtools/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/usr/local/Cellar/node/11.6.0/lib/node_modules/ice-devtools/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/usr/local/Cellar/node/11.6.0/lib/node_modules/ice-devtools/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/usr/local/Cellar/node/11.6.0/lib/node_modules/ice-devtools/node_modules/request/request.js:185:22)
at Request.emit (events.js:182:13)
at Request. (/usr/local/Cellar/node/11.6.0/lib/node_modules/ice-devtools/node_modules/request/request.js:1161:10)
at Request.emit (events.js:182:13)
at IncomingMessage. (/usr/local/Cellar/node/11.6.0/lib/node_modules/ice-devtools/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:273:13)
at IncomingMessage.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1081:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
name: 'StatusCodeError',
statusCode: 404,
message:
'404 - "{\"error\":\"[not_found] document not found\",\"reason\":\"[not_found] document not found\"}"',
error:
'{"error":"[not_found] document not found","reason":"[not_found] document not found"}',
options:
The text was updated successfully, but these errors were encountered: