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

Installing Gatsby plugins removes necessary files in node_modules directory #1468

Closed
sethjenks opened this issue Jul 11, 2017 · 2 comments
Closed

Comments

@sethjenks
Copy link

Node: v6.10.2
macOS: 10.12.5
Gatsby: 1.0.11

It seems that Installing 'gatsby-plugin-styled-components' on a fresh install of Gatsby 1.0.11 removes a bunch the files in the node_modules folder.

screenshot 2017-07-11 10 20 55

After installing and running gatsby develop I get A local install of Gatsby was not found. You should save Gatsby as a site dependency e.g. npm install --save gatsby

I've tried this with a couple other plugins and I get a similar result.

gatsby-config.js

module.exports = {
  siteMetadata: {
    title: `Gatsby Default Starter`,
  },
  plugins: [`gatsby-plugin-react-helmet`,
            `gatsby-plugin-styled-components,`
           ],
}

package.json

{
  "name": "gatsby-starter-default",
  "description": "Gatsby default starter",
  "version": "1.0.0",
  "author": "Kyle Mathews <mathews.kyle@gmail.com>",
  "dependencies": {
    "gatsby": "^1.0.1",
    "gatsby-link": "^1.0.1",
    "gatsby-plugin-react-helmet": "^1.0.1",
    "gatsby-transformer-yaml": "^1.0.1"
  },
  "devDependencies": {
    "gh-pages": "^0.12.0"
  },
  "keywords": [
    "gatsby"
  ],
  "license": "MIT",
  "main": "n/a",
  "scripts": {
    "build": "gatsby build",
    "deploy": "gatsby build --prefix-paths && gh-pages -d public",
    "develop": "gatsby develop",
    "format": "prettier --trailing-comma es5 --no-semi --single-quote --write \"pages/*.js\" \"utils/*.js\" \"wrappers/*.js\" \"html.js\"",
    "test": "echo \"Error: no test specified\" && exit 1"
  }
}

Is anyone else having a similar issue?

@sethjenks sethjenks changed the title Installing 'gatsby-plugin-styled-components' plugin removes all the files in node_modules Installing Gatsby plugins removes necessary files in node_modules directory Jul 11, 2017
@KyleAMathews
Copy link
Contributor

NPM is behaving very oddly. Perhaps try Yarn and see if that works better for you. https://yarnpkg.com/en/

@benjaminhoffman
Copy link
Contributor

@sethjenks is your issue solved? Closing this for now bc of inactivity but feel free to re-open if I am mistaken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants