首页 > 解决方案 > 如何构建 d3-mitch-tree dist 文件夹

问题描述

我正在考虑在项目中使用 d3-mitch-tree。项目中的所有 javascript 文件都托管在本地非常重要。所以我需要 d3-mitch-tree.js,以及其他从 github 提供的源代码构建到 dist 文件夹中的文件。

但是,没有使用包构建此文件夹的说明(我可以找到)。

在https://d3-mitch-tree.netlify.app/manual/development.html有一个模糊的提示,我可以运行 npm 命令npm run build-dev来构建,但我尝试了,只是得到了错误消息:

> d3-mitch-tree@0.0.0-development build-dev /home/nikki/d3-mitch-tree
> npm-run-all "build-sass" "build-webpack-dev" "build-docs"

sh: 1: npm-run-all: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! d3-mitch-tree@0.0.0-development build-dev: `npm-run-all "build-sass" "build-webpack-dev" "build-docs"`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the d3-mitch-tree@0.0.0-development build-dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/nikki/.npm/_logs/2021-04-28T18_45_40_819Z-debug.log

标签: d3.js

解决方案


推荐阅读