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

tgz 打包报错 #412

Closed
gclm opened this issue Aug 30, 2022 · 7 comments
Closed

tgz 打包报错 #412

gclm opened this issue Aug 30, 2022 · 7 comments

Comments

@gclm
Copy link
Contributor

gclm commented Aug 30, 2022

[Error [TarStreamError]: ENOENT: no such file or directory, stat linux-command.docset/Contents/Resources/docSet.dsidx-journal 这个是如何产生的啊

@gclm
Copy link
Contributor Author

gclm commented Aug 30, 2022

我看我本地还是我自己的github action 没出现这个啊

@jaywcjlove
Copy link
Owner

function createDatabase(apiList, dbPath) {
const db = new sqlite3.Database(dbPath);
db.serialize(() => {
db.run('CREATE TABLE searchIndex(id INTEGER PRIMARY KEY, name TEXT, type TEXT, path TEXT);');
db.run('CREATE UNIQUE INDEX anchor ON searchIndex (name,type,path);');
let stmt = db.prepare('INSERT OR IGNORE INTO searchIndex(name, type, path) VALUES (?, ?, ?)');
apiList.forEach(({ name, type, path }) => {
stmt.run(name, type, path);
});
stmt.finalize();
});
db.close();
}

这是一个sqlite 文件。

@gclm
Copy link
Contributor Author

gclm commented Aug 30, 2022

其实我有点的迷的地方就在这里,按照await 的原理,只有buildApi执行完毕才会到压缩这里,但是目前看这里并没有执行完毕就到了压缩这里

@jaywcjlove
Copy link
Owner

@gclm 好像可以了

@gclm
Copy link
Contributor Author

gclm commented Aug 30, 2022

Dash 已经可以获取了。
image
但是很迷就是但是我看着两个好像没区别啊
image

@jaywcjlove
Copy link
Owner

@gclm 有区别,你看下面三行代码

const DOC_NAME = pkg.name;
const DOC_ROOT_DIR = pathResolve(__dirname, `../.deploy/${DOC_NAME}`);
const DOCSET_DIR = `${DOC_ROOT_DIR}.docset`;

@gclm
Copy link
Contributor Author

gclm commented Aug 30, 2022

image

我打印了一下发现一样,没发现有啥区别。唯一区别就是拼接方案不一样。回头研究一下吧。

@gclm gclm closed this as completed Aug 30, 2022
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

2 participants