-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Following Contributing docs fails locally #2377
Comments
* Always `npm install` samples/package.json before running sample tests * Copy, rather than symlink, in `test.samples.auth` Partially fixes googleapis#2377.
@elierotenberg this answers my question 😄 Is there a tracking issue on Node.js (or is this a known limitation of Windows?). I'm on the Node.js tooling team, and would love to fix odd things like this. |
I couldn't find an issue on Node.js, because I believe it "works as intented" on Windows: symlinks in "dir" or "file" mode require elevated privileges, "junction" doesn't but only works on directories. Another option would be to symlink (using junction on Windows, |
Environment details
googleapis
version: 60.0.1Steps to reproduce
npm run samples-test
,npm run system-test
(without priornpm run fix
).Working on a PR, I checkout out the repo and followed the CONTRIBUTING instructions.
I ran across several issues, similar to those encountered in
nodejs-googleapis-common
.Not Windows-related
The following dependencies were already in the samples
package.json
but causednpm run samples test
to fail:@google-cloud/local-auth
,nconf
,express
.This is because the samples subpackage isn't installed. It is installed as a side effect of
npm run prelint
which may hide the problem, e.g. ifprelint
has run at least once.Running
npm install
from thesamples
subdir solved it.Windows related
The following error is raised when running
npm run samples-test
on Windows:This is likely because
fs.symlinkSync
doesn't work properly on Windows on files (altough it works with directories usingjunction
type) or requires privilege elevation.As a workaround, copying the file instead of symlinking it solved it.
Authentication related
The problems described in this issue also apply.
The text was updated successfully, but these errors were encountered: