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

Webpack error #98123 when running "gatsby develop" #17557

Closed
coldPen opened this issue Sep 11, 2019 · 22 comments

Comments

@coldPen
Copy link

@coldPen coldPen commented Sep 11, 2019

Description

gatsby develop doesn't work because of an error #98123 from Webpack.

Steps to reproduce

  1. Clone my repo
  2. cd into that repo
  3. Run npm install
  4. Run gatsby develop

Expected result

Development server should start

Actual result

I get this output:

ERROR #98123  WEBPACK
Generating SSR bundle failed
[BABEL] /home/fw33n/ateliers-chartreux/.cache/develop-static-entry.js: Cannot find module '@babel/helper-create-class-features-plugin' (While processing: "/home/fw33n/ateliers-chartreux/node_modules/@babel/plugin-proposal-class-properties/lib/index.js")
File: .cache/develop-static-entry.js
⠼ start webpack server

Environment

gatsby info --clipboard (I'm running Ubuntu in WSL):

System:
  OS: Linux 4.4 Ubuntu 18.04.2 LTS (Bionic Beaver)
  CPU: (8) x64 Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
  Shell: 4.4.19 - /bin/bash
Binaries:
  Node: 10.16.3 - ~/.nvm/versions/node/v10.16.3/bin/node
  npm: 6.11.3 - ~/.nvm/versions/node/v10.16.3/bin/npm
Languages:
  Python: 2.7.15+ - /usr/bin/python
npmPackages:
  gatsby: ^2.15.9 => 2.15.9
  gatsby-plugin-sass: ^2.1.13 => 2.1.13
  gatsby-source-contentful: ^2.1.33 => 2.1.33
npmGlobalPackages:
  gatsby-cli: 2.7.47

Additionnally, my package.json:

{
  "name": "ateliers-chartreux",
  "private": true,
  "description": "Le site des Ateliers Chartreux",
  "version": "0.1.0",
  "license": "MIT",
  "scripts": {
    "build": "gatsby build",
    "develop": "gatsby develop",
    "format": "prettier --write \"**/*.{js,jsx,json,md}\"",
    "start": "npm run develop",
    "serve": "gatsby serve",
    "test": "echo \"Write tests! -> https://gatsby.dev/unit-testing \""
  },
  "dependencies": {
    "gatsby": "^2.15.9",
    "gatsby-plugin-sass": "^2.1.13",
    "gatsby-source-contentful": "^2.1.33",
    "node-sass": "^4.12.0",
    "react": "^16.9.0",
    "react-dom": "^16.9.0"
  },
  "devDependencies": {
    "prettier": "^1.18.2"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/gatsbyjs/gatsby-starter-hello-world"
  },
  "bugs": {
    "url": "https://github.com/gatsbyjs/gatsby/issues"
  }
}

@jonniebigodes

This comment has been minimized.

Copy link
Contributor

@jonniebigodes jonniebigodes commented Sep 11, 2019

@coldPen sorry that you're experiencing errors with gatsby, but based on the description itself it's a bit difficult to triage. Also you forgot to link the repo.

@coldPen

This comment has been minimized.

Copy link
Author

@coldPen coldPen commented Sep 13, 2019

Thank you @jonniebigodes , here's the repo although I'm not sure this has anything to do with the project itself, I can run develop and build on my Linux computer, this seems specific to WSL?

@jonniebigodes

This comment has been minimized.

Copy link
Contributor

@jonniebigodes jonniebigodes commented Sep 14, 2019

@coldPen cloning it to my wsl machine and going to take a look at what could be the issue.

@jonniebigodes

This comment has been minimized.

Copy link
Contributor

@jonniebigodes jonniebigodes commented Sep 14, 2019

@coldPen i've been testing this today and this one is kinda tricky to triage. Here are the steps i took.

  • Cloned the repo into my ubuntu wsl "machine". I'm running Ubuntu 18.04 LTS
  • Here's the result of gatsby info in Ubuntu.
    cold_pen_wsl_1
  • Installed the dependencies and issued sudo yarn develop, since i've not configured yarn/npm i've got to run it with elevated privileges and i'm presented with the following:
    cold_pen_wsl_2

The errors thrown are based on the fact that i confugured a space for issues regarding gatsby and contenful and when the plugin tries to fetch the data based on your query it will fail.

I would like for you to do a couple of steps to see if you can get it to run in wsl.

  • Remove package-lock.json and/or yarn.lock
  • Issue gatsby clean to purge any stale data.
  • Remove node_modules folder.
  • Install the dependencies again with your package manager of choice, either npm or yarn.
  • Issue gatsby develop and see if the error does not pop back.

These because if memory serves me right it could be some issue with a package.

Feel free to provide feedback so that we can close this issue or continue to work on it until we find a suitable solution.

@coldPen

This comment has been minimized.

Copy link
Author

@coldPen coldPen commented Sep 15, 2019

Thank you for paying close attention to this! I'll get back to you as soon as I get back on this computer.

@shicholas

This comment has been minimized.

Copy link

@shicholas shicholas commented Sep 16, 2019

I am seeing this error too. My code works fine on my mac, but fails in CI, which uses Ubuntu (https://circleci.com/gh/1337lawyers/web/360)

@shicholas

This comment has been minimized.

Copy link

@shicholas shicholas commented Sep 16, 2019

I solved my issue by adding python to my environment - perhaps it's the same issue you're having @coldPen ?

@coldPen

This comment has been minimized.

Copy link
Author

@coldPen coldPen commented Sep 16, 2019

@shicholas Python: 2.7.15+ - /usr/bin/python was displayed when I ran gatsby info, so I don't know? Maybe gatsby can't find python even if installed.

@jonniebigodes

This comment has been minimized.

Copy link
Contributor

@jonniebigodes jonniebigodes commented Sep 16, 2019

@shicholas locally on ubuntu 18.04 it comes with python 2.7+ if not mistaken.

@shicholas

This comment has been minimized.

Copy link

@shicholas shicholas commented Sep 16, 2019

hmm, it's probably not it then. fwiw, I have Python 3.8 installed.

@shaneiadt

This comment has been minimized.

Copy link

@shaneiadt shaneiadt commented Sep 19, 2019

I'm getting the same issue when attempting to run gatsby develop.

System:
    OS: Windows 10
    CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
  Binaries:
    Yarn: 1.17.3 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
  Languages:
    Python: 2.7.15
  Browsers:
    Edge: 44.18362.329.0
  npmPackages:
    gatsby: ^2.15.18 => 2.15.18
    gatsby-image: ^2.2.19 => 2.2.19
    gatsby-plugin-manifest: ^2.2.17 => 2.2.17
    gatsby-plugin-offline: ^3.0.7 => 3.0.7
    gatsby-plugin-react-helmet: ^3.1.7 => 3.1.7
    gatsby-plugin-sharp: ^2.2.24 => 2.2.24
    gatsby-source-filesystem: ^2.1.24 => 2.1.24
    gatsby-transformer-sharp: ^2.2.15 => 2.2.15

I've tried gatsby clean & re-installed all npm packages but no joy :(

Any help would be great, not quite sure were to go from here.

@shaneiadt

This comment has been minimized.

Copy link

@shaneiadt shaneiadt commented Sep 19, 2019

I've also updated to Python: 3.7.4 but still not working....dang!

@shaneiadt

This comment has been minimized.

Copy link

@shaneiadt shaneiadt commented Sep 19, 2019

I tried moving the project folder to another directory as I had a special character in the folder path & everything works fine now 👍

Maybe check your folder structure doesn't have any special characters. @coldPen

@coldPen

This comment has been minimized.

Copy link
Author

@coldPen coldPen commented Sep 19, 2019

@shaneiadt thank you, but that isn't the case (repo is named ateliers-chartreux, is - considered a special character? )
@jonniebigodes I followed your instructions and nothing changed. I then reinstalled the Ubuntu subsystem and it's working again, fingers crossed!

@jonniebigodes

This comment has been minimized.

Copy link
Contributor

@jonniebigodes jonniebigodes commented Sep 19, 2019

@shaneiadt special characters would be for instance à,ç,é,â or ã, these being particular to the portuguese language, if it had used any of those for filenames and/or on path it would probably break the build.

I considered that the use of characters could be the case in the last test that i did, because one special character of those listed above is being used in a query, but i confirmed that was not the case by modifying the query in the appropriate file to my contentful space and it returned the data correctly.

Also when i test a issue that pops in here, i usually use the following nomenclature for testing, create a gatsby site called test-nameofauthorofissue and it works fine with either windows 10 or linux in vm or wsl.

@coldPen on one side i'm happy that it's working, but on the other side having to reinstall the wsl is something that is not actually productive if the issue persists.

@coldPen

This comment has been minimized.

Copy link
Author

@coldPen coldPen commented Sep 27, 2019

@jonniebigodes I feel this problem is largely beyond my understanding, furthermore this only concerned a work environment which I only use secondarily. I'm sorry but I need to make this repo private since I have to commit my environment variables file to start deploying it. Won't close the issue though, if you think it's still relevant?

@jonniebigodes

This comment has been minimized.

Copy link
Contributor

@jonniebigodes jonniebigodes commented Sep 29, 2019

@coldPen it could be some variable we're both missing, probably due to some permissions or something like that,go ahead and make the repo private and continue your work. I'll leave it you to if you want this open or not. If you want to close it feel free to do so and we can always re-open it.

@coldPen coldPen closed this Sep 30, 2019
@denvercoder

This comment has been minimized.

Copy link

@denvercoder denvercoder commented Oct 6, 2019

For what it's worth I had this same issue and it came down to a case-sensitivity issue. It worked fine on my mac but failed on Netlify's servers because of some of the component names:

import Button from '../components/button

src
- components
- Button
-Button.js

@prydda

This comment has been minimized.

Copy link

@prydda prydda commented Oct 14, 2019

npm run develop will get you up & running for now.

@mujeeb91

This comment has been minimized.

Copy link

@mujeeb91 mujeeb91 commented Dec 4, 2019

I was facing the same issue. Here's what I did to fix it.

  1. Uninstalled gatsby via npm uninstall -g gatsby-cli
  2. Updated Node version from 8.9.0 -> 12.13.1 (using nvm)
  3. Reinstalled gatsby via npm install -g gatsby-cli
@454de6e

This comment has been minimized.

Copy link

@454de6e 454de6e commented Dec 4, 2019

This error was introduced by updating an ESLint plugin, which is not related to Gatsby at all. My workaround is to delete yarn.lock and run yarn again to recreate the file. This may be a hint that the issue is triggered by a dependency that Gatsby and whatever caused it have in common.

@DevWichrowski

This comment has been minimized.

Copy link

@DevWichrowski DevWichrowski commented Dec 9, 2019

Hello,
I also had that problem,I just created config file with wrong name ,for typography you need a file src/utils/typography.js

import Typography from "typography"
import fairyGateTheme from "typography-theme-fairy-gates"

const typography = new Typography(fairyGateTheme)

export const { scale, rhythm, options } = typography
export default typography

Also remember about gatsby-config.js in root

module.exports = {
  plugins: [
    {
      resolve: `gatsby-plugin-typography`,
      options: {
        pathToConfigModule: `src/utils/typography`,
      },
    },
  ],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants
You can’t perform that action at this time.