【发布时间】:2016-06-20 09:01:46
【问题描述】:
我尝试使用带有 npm 的 recommended method 1 在本地安装 vega.js 和 vega 编辑器,但我的 Mac 从未完成运行 npm install。
我也尝试了第三种方法:npm install vega,这次我设法将 vega.js 安装为节点模块,见下图。但是,我不知道如何使用这个节点项目和 vega 模块运行 vega 示例。
当我在运行npm run vendor 时尝试安装 vega 编辑器时,出现以下错误:
They are for You: /Users/Natsume/Documents/D3_dc/3. node_npm_vega
->npm run vendor
npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "vendor"
npm ERR! node v4.4.5
npm ERR! npm v2.15.5
npm ERR! path /Users/Natsume/Documents/D3_dc/3. node_npm_vega/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/Users/Natsume/Documents/D3_dc/3. node_npm_vega/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Natsume/Documents/D3_dc/3. node_npm_vega/npm-debug.log
They are for You: /Users/Natsume/Documents/D3_dc/3. node_npm_vega
似乎建议应该有一个package.json,但我应该从哪里得到它?我是否应该继续寻找有关如何使用 npm 安装 vega 和 vega 编辑器的答案?
如果可能,谁能告诉我如何在不使用npm install 的情况下在本地使用 vega 编辑器运行 vega 示例?谢谢!
【问题讨论】:
-
为什么首选使用 node 和 npm 安装甚至运行 vega 项目?
标签: vega