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

Add history as top-level dependency #174

Merged
merged 1 commit into from
Mar 7, 2016
Merged

Add history as top-level dependency #174

merged 1 commit into from
Mar 7, 2016

Conversation

scottnonnenberg
Copy link
Contributor

history is being half-installed by npm 2.14.12 due to scroll-behavior peerDependency, which caused the webpack build to fail when it couldn't find history's dependency 'warning.' This does not happen in npm 3.x because all dependencies are installed at top level.

This was the webpack error:

ERROR in /usr/local/lib/~/gatsby/~/history/lib/DOMStateStorage.js
Module not found: Error: Cannot resolve module 'warning' in /usr/local/lib/node_modules/gatsby/node_modules/history/lib
 @ /usr/local/lib/~/gatsby/~/history/lib/DOMStateStorage.js 10:15-33

Note that history was also installed under react-router, where it had all required dependencies.

Also removes this warning:

npm WARN peerDependencies The peer dependency history@^1.12.1 || ^2.0.0 included from scroll-behavior will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.

Half-pulled in by npm 2.14.12 due to scroll-behavior peerDependency,
which caused the webpack build to fail when it couldn't find history's
dependency 'warning.' This does not happen in npm 3.x because all 
dependencies are installed at top level.
KyleAMathews added a commit that referenced this pull request Mar 7, 2016
Add history as top-level dependency
@KyleAMathews KyleAMathews merged commit 1e44024 into gatsbyjs:master Mar 7, 2016
@KyleAMathews
Copy link
Contributor

Thanks!

@scottnonnenberg scottnonnenberg deleted the fix-npm-2x branch March 7, 2016 18:10
mef added a commit to mef/gatsby-starter-blog that referenced this pull request Mar 24, 2016
was causing the webpack build to fail (cf similar problem fixed in gatsbyjs/gatsby/pull/174)
mef added a commit to mef/gatsby-starter-default that referenced this pull request Mar 24, 2016
was causing the webpack build to fail (cf similar problem fixed in gatsbyjs/gatsby#174)
mef added a commit to mef/gatsby-starter-documentation that referenced this pull request Mar 24, 2016
was causing the webpack build to fail (cf similar problem fixed in gatsbyjs/gatsby#174)
mef added a commit to mef/gatsby-starter-default that referenced this pull request Mar 24, 2016
was causing the webpack build to fail (cf similar problem fixed in gatsbyjs/gatsby#174)

Error message:

    ERROR in ./wrappers/yaml.js
    Module not found: Error: Cannot resolve module 'js-yaml' in /home/username/gatsby-default/wrappers
     @ ./wrappers/yaml.js 17:14-32

`gatsby develop` starts well after performing this change.
idev-a pushed a commit to idev-a/landing-page-gatsby that referenced this pull request Dec 14, 2020
was causing the webpack build to fail (cf similar problem fixed in gatsbyjs/gatsby#174)
idev-a pushed a commit to idev-a/landing-page-gatsby that referenced this pull request Dec 14, 2020
was causing the webpack build to fail (cf similar problem fixed in gatsbyjs/gatsby#174)

Error message:

    ERROR in ./wrappers/yaml.js
    Module not found: Error: Cannot resolve module 'js-yaml' in /home/username/gatsby-default/wrappers
     @ ./wrappers/yaml.js 17:14-32

`gatsby develop` starts well after performing this change.
goldenjake pushed a commit to goldenjake/gatsby-starter-default that referenced this pull request May 19, 2022
was causing the webpack build to fail (cf similar problem fixed in gatsbyjs/gatsby#174)
goldenjake pushed a commit to goldenjake/gatsby-starter-default that referenced this pull request May 19, 2022
was causing the webpack build to fail (cf similar problem fixed in gatsbyjs/gatsby#174)

Error message:

    ERROR in ./wrappers/yaml.js
    Module not found: Error: Cannot resolve module 'js-yaml' in /home/username/gatsby-default/wrappers
     @ ./wrappers/yaml.js 17:14-32

`gatsby develop` starts well after performing this change.
hardcarry1995 added a commit to hardcarry1995/gatsby-netlify-form-example-v2 that referenced this pull request Dec 28, 2022
was causing the webpack build to fail (cf similar problem fixed in gatsbyjs/gatsby#174)
hardcarry1995 added a commit to hardcarry1995/gatsby-netlify-form-example-v2 that referenced this pull request Dec 28, 2022
was causing the webpack build to fail (cf similar problem fixed in gatsbyjs/gatsby#174)

Error message:

    ERROR in ./wrappers/yaml.js
    Module not found: Error: Cannot resolve module 'js-yaml' in /home/username/gatsby-default/wrappers
     @ ./wrappers/yaml.js 17:14-32

`gatsby develop` starts well after performing this change.
leonhiat added a commit to leonhiat/gatsby-starter-blog that referenced this pull request Oct 31, 2023
was causing the webpack build to fail (cf similar problem fixed in gatsbyjs/gatsby/pull/174)
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

Successfully merging this pull request may close these issues.

2 participants