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

[V2] ' gatsby build ' command is not working #6465

Closed
ghost opened this issue Jul 15, 2018 · 5 comments
Closed

[V2] ' gatsby build ' command is not working #6465

ghost opened this issue Jul 15, 2018 · 5 comments

Comments

@ghost
Copy link

ghost commented Jul 15, 2018

Description

gatsby build command is not working after upgrading through npm install. Please find my package.json file below.

{
"name": "gatsby-starter-default",
"description": "Gatsby default starter",
"version": "1.0.0",
"author": "Kyle Mathews mathews.kyle@gmail.com",
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.0",
"@fortawesome/react-fontawesome": "^0.1.0",
"axios": "^0.18.0",
"chart.js": "^2.7.2",
"eslint-fix": "^1.0.3",
"gatsby": "next",
"gatsby-plugin-create-client-paths": "^1.0.8",
"gatsby-plugin-react-helmet": "next",
"gatsby-react-router-scroll": "^1.0.18",
"react": "^16.4.1",
"react-chartjs-2": "^2.7.2",
"react-dom": "^16.4.1",
"react-helmet": "^5.2.0",
"react-router-dom": "^4.3.1"
},
"keywords": [
"gatsby"
],
"license": "MIT",
"scripts": {
"build": "gatsby build",
"develop": "gatsby develop",
"format": "prettier --write 'src/**/*.js'",
"test": "echo "Error: no test specified" && exit 1"
},
"devDependencies": {
"prettier": "^1.12.0"
},
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby-starter-default"
}
}

Steps to reproduce

'gatsby build' and 'gatsby serve' used to work with gatsby V2 . Today , i ran npm install command to make sure that my packages are the latest. After this installation , gatsby build stopped working.

i have no issues with gatsby develop. Please find the error mentioned below.

Error: ./src/Containers/Sidebar/Sidebar.module.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleNotFoundError: Module not found: Error: Can't resolve 'Assets/fonts/Lato-Bold.ttf'

I have included the fonts path in my css files. This used to work before but stopped working now.

Expected result

gatsby build should work because it is used to work.

Actual result

gatsby build failed. I have pasted the error above.

Environment

System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.6.0 - /usr/local/bin/node
npm: 6.1.0 - /usr/local/bin/npm
Browsers:
Chrome: 67.0.3396.99
Safari: 11.1.2
npmPackages:
gatsby: next => 2.0.0-beta.38
gatsby-plugin-create-client-paths: ^1.0.8 => 1.0.8
gatsby-plugin-react-helmet: next => 3.0.0-beta.3
gatsby-react-router-scroll: ^1.0.18 => 1.0.18
npmGlobalPackages:
gatsby-cli: 1.1.58

File contents (if changed)

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

@ghost ghost changed the title ' gatsby build ' command is not working [V2] ' gatsby build ' command is not working Jul 15, 2018
@ghost
Copy link
Author

ghost commented Jul 15, 2018

The issue is introduced in 2.0.0-beta.37.

When i reverted to 2.0.0-beta.36 , the issue mentioned above is not seen.

@KyleAMathews
Copy link
Contributor

Try upgrading to beta.38 which should have fixed this issue #6461

@ghost
Copy link
Author

ghost commented Jul 15, 2018

Hello Kyle, The issue is still seen with version 37 , 38. When i reverted to version 36 , the issue is not seen. Please let me know if you need more information to fix this issue.

Thanks
Aravind

@KyleAMathews
Copy link
Contributor

If you could make your source available that'd be great!

@ghost
Copy link
Author

ghost commented Jul 16, 2018

Sure kyle. I will send the code that will replicate the issue. I will send this as soon as i can.

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

1 participant