Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

SVGR #5

Closed
erichodges opened this issue Jun 15, 2018 · 7 comments
Closed

SVGR #5

erichodges opened this issue Jun 15, 2018 · 7 comments

Comments

@erichodges
Copy link

Hi Greg,

It seems that there's an install issue with svgr. It has been split into 4 installs. This is causing an error when installing your repo. I assume this is coming from Gatsby, but I'm not sure.

@gouravsood
Copy link
Contributor

@erichodges @greglobinski

I had the same problem yesterday when I tried npm install in the root. I was trying to add https://github.com/matchilling/gatsby-remark-emojis in the project and npm install --save gatsby-remark-emojis failed.

If I follow the gatsby new [NEW_SITE_DIRECTORY_FOR_YOUR_BLOG] https://github.com/greglobinski/gatsby-starter-hero-blog.git and create a project, it works smoothly if you just update the markdown files.

Logs below:

npm WARN deprecated postcss-cssnext@3.1.0: 'postcss-cssnext' has been deprecated in favor of 'postcss-preset-env'. Read more at https://moox.io/blog/deprecating-cssnext/
npm WARN deprecated svgr@2.0.0: Please install @svgr/cli, @svgr/core or @svgr/webpack
npm WARN deprecated babel-preset-es2015@6.24.1: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated postcss-cssnext@2.11.0: 'postcss-cssnext' has been deprecated in favor of 'postcss-preset-env'. Read more at https://moox.io/blog/deprecating-cssnext/
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5

svgr@2.0.0 postinstall /Users/Blog/node_modules/svgr
node message.js; sleep 10; exit 1;

Hello !
SVGR 🦁 v2.0.0 is released 🎉
It is now splitted into several packages, what are you looking for?

Command line @ svgr/cli
Node API @ svgr/core
Webpack @ svgr/webpack
Rollup @ svgr/rollup
Pick the one you need!
npm WARN antd@3.6.2 requires a peer of react@>=16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN antd@3.6.2 requires a peer of react-dom@>=16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN friendly-errors-webpack-plugin@1.7.0 requires a peer of webpack@^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-graphql@2.1.1 requires a peer of graphql@^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN schema-utils@0.4.5 requires a peer of webpack@^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN gblog@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! svgr@2.0.0 postinstall: node message.js; sleep 10; exit 1;
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the svgr@2.0.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:

@erichodges
Copy link
Author

erichodges commented Jun 15, 2018

@gouravsood Thanks!

I don't understand why changing the markdown files would make any difference.

Ok, I ran it via gatsby new ... and it still errors out the same on svgr. Am I supposed to do something else at this point?

@greglobinski
Copy link
Owner

It comes from gatsby-plugin-svgr. I've created an issue. If you are in a hurry, you can workaround this by using the Github version of the plugin or remove it, install @svgr/webpack and put the code of the plugin directly to your gatsby-node.js file

@erichodges
Copy link
Author

Cool, thanks. I'm not in a hurry. Thanks for opening an issue, I thought it would get fixed more quickly coming from you. :-)

@greglobinski
Copy link
Owner

Because of the problems with svgr I removed the gatsby-plugin-svgr plugin and installed gatsby-plugin-react-svg. Use version 1.0.1 of the starter.

@erichodges
Copy link
Author

Ok cool, thank you! :-)

@gouravsood
Copy link
Contributor

@greglobinski cool. It has worked now. Able to import the https://github.com/matchilling/gatsby-remark-emojis and use it in the project 👍

image

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

No branches or pull requests

3 participants