Gatsby: Netlify CMS 1.8.0 Critical dependencies warning

Created on 20 May 2018  Â·  6Comments  Â·  Source: gatsbyjs/gatsby

Description

The latest version of gatsby-plugin-netlify-cms requires to install also netlify-cms, but then at each compilation I see this warning

 warning  in ./~/netlify-cms/dist/cms.js

Critical dependencies:
49:378-385 This seems to be a pre-built javascript file. Though this is possible, it's not recommended. Try to require the original source to get better results.

Which I tracked down to be related to https://github.com/webpack/webpack/issues/1617, but I struggle to find a clean way to fix this.

Steps to reproduce

Install [email protected], [email protected] and [email protected]

Expected result

I expect to get a working netlify CMS without warnings.

Actual result

I get this warning:

 warning  in ./~/netlify-cms/dist/cms.js

Critical dependencies:
49:378-385 This seems to be a pre-built javascript file. Though this is possible, it's not recommended. Try to require the original source to get better results.

Environment

  • Gatsby version (npm list gatsby): 1.9.261
  • gatsby-cli version (gatsby --version): 1.1.52
  • Node.js version: 8.9.2
  • Operating System: macOS High Sierra

File contents (if changed)

gatsby-config.js:

module.exports = {
  siteMetadata: {
    title: "Gatsby Default Starter"
  },
  plugins: [
    "gatsby-plugin-react-helmet",
    "gatsby-plugin-styled-components",
    "gatsby-plugin-netlify-cms"
  ],
  pathPrefix: "/assets"
};

package.json: N/A
gatsby-node.js: N/A
gatsby-browser.js: N/A
gatsby-ssr.js: N/A

Most helpful comment

All 6 comments

It hangs on this error using gatsby develop for me.
If I roll back to netlify-cms 1.7.0 it works.
I'm running the same environment as you otherwise.

This issue should be filed in netlify-cms not here.

I mentioned this on the NetlifyCMS Gitter. I agree with @KyleAMathews that this is their problem, but there is a slightly annoying thing whereby running gatsby-develop is fine (it is just a warning after all), but after that warning fires, you don't get any further output in the console, so the useful links for the site URL and GraphiQL URL don't ever appear. On Gitter they suggested that could be fixed Gatsby side.

@martynhoyer I'm thinking you could file a separate Gatsby issue for that?

@tech4him1 Good shout, will do.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

totsteps picture totsteps  Â·  3Comments

hobochild picture hobochild  Â·  3Comments

timbrandin picture timbrandin  Â·  3Comments

signalwerk picture signalwerk  Â·  3Comments

ghost picture ghost  Â·  3Comments