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
[cli] Move readme copy logic to a helper function for vc link
#10084
Conversation
ncc has an issue with detecting + rewriting this file path for some reason. Moving to a helper function should work around that issue. Fixing: ``` Error: ENOENT: no such file or directory, open '/node_modules/vercel/projects/VERCEL_DIR_README.txt' ```
🦋 Changeset detectedLatest commit: cda8a24 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
await writeFile( | ||
join(path, VERCEL_DIR, VERCEL_DIR_README), | ||
await readFile(join(__dirname, 'VERCEL_DIR_README.txt'), 'utf8') | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (non-blocking): Node 14 introduce import { copyFile } from 'fs/promises';
: https://nodejs.org/dist/latest-v18.x/docs/api/fs.html#fspromisescopyfilesrc-dest-mode
await writeFile( | |
join(path, VERCEL_DIR, VERCEL_DIR_README), | |
await readFile(join(__dirname, 'VERCEL_DIR_README.txt'), 'utf8') | |
); | |
await copyFile( | |
join(__dirname, 'VERCEL_DIR_README.txt'), | |
join(path, VERCEL_DIR, VERCEL_DIR_README) | |
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can no longer reproduce the issue with the tarball from this PR.
ncc has an issue with detecting + rewriting this file path for some reason. Moving to a helper function should work around that issue.
Fixing: