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

Multiple errors when trying to run site under develop #30

Closed
brainwipe opened this issue Feb 19, 2018 · 5 comments
Closed

Multiple errors when trying to run site under develop #30

brainwipe opened this issue Feb 19, 2018 · 5 comments

Comments

@brainwipe
Copy link

brainwipe commented Feb 19, 2018

I ran the instructions without making any changes to the repo. I'm not using yarn.

gatsby new YourProjectName https://github.com/Vagr9K/gatsby-material-starter
npm install # or yarn install
npm run develop # or gatsby develop

And received the following error:

brainwipe@Beaker:/mnt/g/Web/icar2$ npm run develop

> gatsby-starter-material@1.1.0 develop /mnt/g/Web/icar2
> gatsby develop

success delete html files from previous builds — 0.009 s
success open and validate gatsby-config.js — 0.005 s
success copy gatsby files — 0.075 s
success onPreBootstrap — 0.409 s
success source and transform nodes — 0.064 s
error Plugin gatsby-transformer-remark returned an error


  Error: librsvg-2.so.2: cannot enable executable stack as shared object requires: Invalid argument

  - v8-compile-cache.js:159 require
    [icar2]/[v8-compile-cache]/v8-compile-cache.js:159:20

  - constructor.js:10 Object.<anonymous>
    [icar2]/[sharp]/lib/constructor.js:10:15

  - v8-compile-cache.js:178 Module._compile
    [icar2]/[v8-compile-cache]/v8-compile-cache.js:178:30

  - v8-compile-cache.js:159 require
    [icar2]/[v8-compile-cache]/v8-compile-cache.js:159:20

  - index.js:3 Object.<anonymous>
    [icar2]/[sharp]/lib/index.js:3:15

  - v8-compile-cache.js:178 Module._compile
    [icar2]/[v8-compile-cache]/v8-compile-cache.js:178:30


success building schema — 0.288 s
success createLayouts — 0.009 s
success createPages — 0.064 s
success createPagesStatefully — 0.016 s
success onPreExtractQueries — 0.001 s
error Plugin gatsby-transformer-remark returned an error


  Error: librsvg-2.so.2: cannot enable executable stack as shared object requires: Invalid argument

  - v8-compile-cache.js:159 require
    [icar2]/[v8-compile-cache]/v8-compile-cache.js:159:20

  - constructor.js:10 Object.<anonymous>
    [icar2]/[sharp]/lib/constructor.js:10:15

  - v8-compile-cache.js:178 Module._compile
    [icar2]/[v8-compile-cache]/v8-compile-cache.js:178:30

  - v8-compile-cache.js:159 require
    [icar2]/[v8-compile-cache]/v8-compile-cache.js:159:20

  - index.js:3 Object.<anonymous>
    [icar2]/[sharp]/lib/index.js:3:15

  - v8-compile-cache.js:178 Module._compile
    [icar2]/[v8-compile-cache]/v8-compile-cache.js:178:30


success update schema — 0.178 s
GraphQL Error There was an error while compiling your site's GraphQL queries.
  Invariant Violation: GraphQLParser: Unknown field `timeToRead` on type `MarkdownRemark`. Source: document `IndexQuery` file: `GraphQL request`.

success extract queries from components — 0.066 s
success run graphql queries — 0.090 s
success write out page data — 0.013 s
success write out redirect data — 0.001 s
success onPostBootstrap — 0.001 s

info bootstrap finished - 3.235 s

 ERROR  Failed to compile with 16 errors                                                                                                             20:38:43

 error

ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/templates/post.scss 4:14-134 13:2-17:4 14:20-140
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/layouts/index.scss 4:14-135 13:2-17:4 14:20-141
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/layouts/global.scss 4:14-136 13:2-17:4 14:20-142
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/UserInfo/UserInfo.scss 4:14-144 13:2-17:4 14:20-150
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/PostSuggestions/PostSuggestions.scss 4:14-151 13:2-17:4 14:20-157
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/PostTags/PostTags.scss 4:14-144 13:2-17:4 14:20-150
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/PostCover/PostCover.scss 4:14-145 13:2-17:4 14:20-151
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/About/About.scss 4:14-141 13:2-17:4 14:20-147
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/PostInfo/PostInfo.scss 4:14-144 13:2-17:4 14:20-150
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/SocialLinks/SocialLinks.scss 4:14-147 13:2-17:4 14:20-153
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./~/font-awesome/scss/font-awesome.scss 4:14-116 13:2-17:4 14:20-122
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/Navigation/Navigation.scss 4:14-146 13:2-17:4 14:20-152
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/UserLinks/UserLinks.scss 4:14-145 13:2-17:4 14:20-151
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/PostPreview/PostPreview.scss 4:14-147 13:2-17:4 14:20-153
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/ToolbarActions/ToolbarActions.scss 4:14-150 13:2-17:4 14:20-156
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/Footer/Footer.scss 4:14-142 13:2-17:4 14:20-148
 WAIT  Compiling...                                                                                                                                  0:38:44
 ERROR  Failed to compile with 16 errors                                                                                                             0:38:46
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/templates/post.scss 4:14-134 13:2-17:4 14:20-140
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./~/font-awesome/scss/font-awesome.scss 4:14-116 13:2-17:4 14:20-122
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/layouts/index.scss 4:14-135 13:2-17:4 14:20-141
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/layouts/global.scss 4:14-136 13:2-17:4 14:20-142
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/UserInfo/UserInfo.scss 4:14-144 13:2-17:4 14:20-150
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/PostTags/PostTags.scss 4:14-144 13:2-17:4 14:20-150
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/PostCover/PostCover.scss 4:14-145 13:2-17:4 14:20-151
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/PostInfo/PostInfo.scss 4:14-144 13:2-17:4 14:20-150
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/SocialLinks/SocialLinks.scss 4:14-147 13:2-17:4 14:20-153
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/PostSuggestions/PostSuggestions.scss 4:14-151 13:2-17:4 14:20-157
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/About/About.scss 4:14-141 13:2-17:4 14:20-147
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/Navigation/Navigation.scss 4:14-146 13:2-17:4 14:20-152
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/UserLinks/UserLinks.scss 4:14-145 13:2-17:4 14:20-151
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/PostPreview/PostPreview.scss 4:14-147 13:2-17:4 14:20-153
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/ToolbarActions/ToolbarActions.scss 4:14-150 13:2-17:4 14:20-156
 error
ENOENT: no such file or directory, scandir '/mnt/g/Web/icar2/node_modules/node-sass/vendor'
 @ ./src/components/Footer/Footer.scss 4:14-142 13:2-17:4 14:20-148

Environment:

Operating System: Ubuntu 16.04.2 xenial LTS running as admin rights on the Windows Subsystem. x64 with node running as x64.
Node.js 9.5.0
Gatsby 1.1.40
npm 5.6.0

Thanks in advance!

@Vagr9K
Copy link
Owner

Vagr9K commented Feb 19, 2018

Ubuntu 16.04.2 xenial LTS running as admin rights on the Windows Subsystem

I'm not sure if this means that you are running as root inside the emulator, but it seems like dependencies aren't being properly installed by npm.
Make sure that you have normal user privileges, and check NPM logs for errors.

Gatsby 1.1.40

Update your locally installed version to at least 1.9.140. Otherwise you'll get quite a lot of magical errors.

Or alternatively use this variant:

git clone https://github.com/Vagr9K/gatsby-material-starter YourProjectName # Clone the project
cd YourProjectname
rm -rf .git # So you can have your own changes stored in VCS.
npm install # or yarn install
npm run develop # or gatsby develop

@brainwipe
Copy link
Author

Thank you for getting back to me. I think I made an error in my original post as I gave the gatsby-cli version, not the npm package.

  • Gatsby-cli is 1.1.40
  • Gatsby is 1.9.204

I'm running both the shell and inside the shell as super user. In short; I have all the permissions in the world.

I've updated the cli to 1.1.41 but the errors are identical. Are there any other tests I can do to help narrow it down?

@Vagr9K
Copy link
Owner

Vagr9K commented Feb 21, 2018

I just noticed in the log that one of the native libraries are crashing while being loaded by the OS.
Apparently it's a WSL related issue:
gatsbyjs/gatsby#3917

There is a workaround in the link. I suspect this is the main problem.

In short; I have all the permissions in the world.

Some NPM packages refuse to install/build properly when running as root. I don't think this is the issue in this case judging by the error messages, but I would strongly advise against running everything as root.

@brainwipe
Copy link
Author

Thanks @Vagr9K, that helped move past that error. Now I'm getting a new error, will take it up with gatsby.

Also, thanks for the tip about running as root. It's something I only do on sandbox dev environments but worth pointing out for anyone else stopping by to read this!

Please close this issue and thank you for your help.

@Vagr9K
Copy link
Owner

Vagr9K commented Feb 28, 2018

You're welcome!

@Vagr9K Vagr9K closed this as completed Feb 28, 2018
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

2 participants