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

fix(gatsby-dev-cli): Persist verdaccio stuff in os.tmpdir #13251

Merged
merged 1 commit into from
Apr 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/gatsby-dev-cli/src/local-npm-registry/verdaccio.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const startVerdaccio = require(`verdaccio`).default
const path = require(`path`)
const fs = require(`fs-extra`)
const _ = require(`lodash`)
const os = require(`os`)

const {
getMonorepoPackageJsonPath,
Expand All @@ -12,7 +13,7 @@ const { registerCleanupTask } = require(`./cleanup-tasks`)
let VerdaccioInitPromise = null

const verdaccioConfig = {
storage: path.join(__dirname, `..`, `..`, `verdaccio`, `storage`),
storage: path.join(os.tmpdir(), `verdaccio`, `storage`),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#branding 😛

Suggested change
storage: path.join(os.tmpdir(), `verdaccio`, `storage`),
storage: path.join(os.tmpdir(), `gatsby`, `verdaccio`, `storage`),

we could also write in node_modules/.cache/verdaccio

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to avoid node_modules because a sudo install could break permissions and cause the same issue as https://circleci.com/gh/gatsbyjs/gatsby/104049?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link?

port: 4873, // default
web: {
enable: true,
Expand Down