question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

docs(tutorial): tutorial/part-three -> walkthrough failing if yarn is selected as packageManager

See original GitHub issue

Summary

when the packageManager in ~/.config/gatsby/config.json set to yarn then the walkthrough failing (see related issues)

Basic example

Possible changes and enhancements:

  • warning, when yarn is selected as packageManager but a package-lock.json exists and is newer than the yarn.lock
  • allow to set the packageManager per project folder
  • add a hint to the tutorial to try yarn?

… other ideas?

Motivation

no error while walkthrough

related Issues

  • #6834 gatsby develop is not working after npm install
  • #20225 Failed to 'gatsby develop' after installing typography plugin
  • #21989 chore(cli): gatsby info and gatsby --version should print which packageManager used
  • #19827 Ambiguous "StoreStateProvider" error for all gatsby commands

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
nicoprestocommented, Mar 31, 2020

Interesting, my walkthrough failed in tutorial three when I was npm installing the typography kit. Not sure if it relates to this. NPM was my main install however. Were you running windows by ay chance?

My walkthrough also failed in tutorial three when using npm install for typography, but was successful with yarn: yarn add gatsby-plugin-typography react-typography typography typography-theme-fairy-gates

1reaction
jonniebigodescommented, Mar 5, 2020

@muescha i was going over this and it seems that the middle one could be the way to go.

When the user installs the cli globally he has the option to set the package manager. When he uses the cli it will default to the one set at the time of installation. But like other CLI’s that exist something like CRA and the vue cli they allow you to initialize the project with package manager of choice through a flag or option-

More even that there’s probably some users that installed yarn at some point but never get around it, or haven’t shifted to their mental model, also after doing a quick check on the documentation, more specifically the tutorial tends to use npm instead of yarn.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Yarn Package Manager Crash Course - YouTube
In this video we will look at the Yarn package manager and talk about what it is and then jump in and look...
Read more >
Install and Use the Yarn Package Manager - Linode
This guide will show you how to install and use the Yarn package manager, a great alternative to NPM which you can use...
Read more >
A Quick Introduction to the Yarn Package Manager
Yarn is a new package manager for JavaScript that aims to be a faster and safer alternative to npm. Learn the basic commands...
Read more >
JavaScript Package Manager – Complete Guide to NPM and ...
A package manager is a tool developers use to automatically find, download, install, configure, upgrade, and uninstall a computer's packages.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found