No such file or directory error using @markdown-confluence/cli - dist/bridge.js
jonshilton opened this issue · comments
Hi There,
I'm getting a no such file or directory error when using the @markdown-confluence/cli@5.5.0. I've also tried the latest docker image and built it locally, and getting the same error. Stack trace from building it locally below (using Node 18 locally):
node ./packages/cli/dist/index.js
node:internal/fs/utils:347
throw err;
^
Error: ENOENT: no such file or directory, open '/path/to/markdown-confluence/packages/cli/dist/bridge.js'
at Object.openSync (node:fs:590:3)
at Object.readFileSync (node:fs:458:35)
at /path/to/markdown-confluence/packages/cli/dist/index.js:170:3411
at /path/to/markdown-confluence/packages/cli/dist/index.js:7:263
at /path/to/markdown-confluence/packages/cli/dist/index.js:177:3498
at /path/to/markdown-confluence/packages/cli/dist/index.js:7:263
at /path/to/markdown-confluence/packages/cli/dist/index.js:177:3882
at /path/to/markdown-confluence/packages/cli/dist/index.js:7:263
at /path/to/markdown-confluence/packages/cli/dist/index.js:177:4058
at /path/to/markdown-confluence/packages/cli/dist/index.js:7:263 {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/path/to/markdown-confluence/packages/cli/dist/bridge.js'
}
It looks like it might be to do with the build not properly linking vm2/build.js to the dist? Not 100% sure on this though.
Let me know if you need any more info from me. Cheers.
Are you running this from the manual build or from the npm package?
I ran in to this as well (same stack trace, @markdown-confluence/cli@5.5.0) running the following command:
npx @markdown-confluence/cli
Wouldn't this be the cause? puppeteer/puppeteer#10352
It appears that the update of puppeteer is related to this issue.
Sorry will update and add a test for the cli :( sorry again for missing this break
@andymac4182 Any plans on cutting a new release soon?
Yes this weekend :) Was trying to get a few of the PRs that fixed things merged. I have just done that so will give it a round of testing on the weekend and do a release.
Awesome! Appreciate the project and the quick reply.
Ran into some build issues on the weekend. Will be resolving this week. Sorry for the delay.
Was a resolution for this ever found? Just found this repo/project, and I am seeing this exact same issue.
I don't think @andymac4182 has gotten around to publishing a release with the fix yet
I was using the cli and everything worked fine for like 3 publishes and then out of nowhere... I get the same error. Tried reinstalling the package and everything. Super weird The error i am getting is:
FAILED: C:\Users\<path..to..doc>\CWC\CWC-Scripting.md publish failed. Error is: ENOENT: no such file or directory, scandir 'C:\Users\<path..to..doc>\CWC\C:\Users\<path..to..doc>\CWC'
It kind of tries to concat the path two times... Why? My config basically looks like the base config on the website:
{
"confluenceBaseUrl": "<...>",
"confluenceParentId": "<...>",
"atlassianUserName": "<...>",
"folderToPublish": "."
}
Edit ok i found my fix, i thought folderToPublish would be enough to set. But actually i had to set "contentRoot: '.'" aswell.
The default "contentRoot: process.cwd()," in the DEFAULT_SETTINGS is generating this weird string for me. Maybe this is an Error with OneDrive, since the Documentation lies in the OneDrive-Synched Documents and process.cwd() maybe does not like that (?)