Gatsby: [v2] Netlify์—์„œ ๋นŒ๋“œ ๊นจ๊ธฐ

์— ๋งŒ๋“  2018๋…„ 09์›” 16์ผ  ยท  5์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: gatsbyjs/gatsby

์„ค๋ช…

๋นŒ๋“œ๋Š” ๋กœ์ปฌ์—์„œ ์ž‘๋™ํ•˜์ง€๋งŒ Netlify์—์„œ๋Š” ์‹คํŒจํ•ฉ๋‹ˆ๋‹ค.

์žฌํ˜„ ๋‹จ๊ณ„

ํ”„๋กœ์ ํŠธ๋Š” ์—ฌ๊ธฐ: https://github.com/merelinguist/playhouse-press/pull/225

์˜ˆ์ƒ ๊ฒฐ๊ณผ

์ •์ƒ์ ์œผ๋กœ ๊ตฌ์ถ•๋˜๊ธฐ๋ฅผ ๊ธฐ๋Œ€ํ•ฉ๋‹ˆ๋‹ค.

์‹ค์ œ ๊ฒฐ๊ณผ

๋นŒ๋“œ๋Š” ๋กœ์ปฌ์—์„œ ์ž˜ ์ž‘๋™ํ•˜์ง€๋งŒ Netlify์—์„œ ์ค‘๋‹จ:

error Generating JavaScript bundles failed

  Error: ./src/components/Page/index.js
  Module not found: Error: Can't resolve '../Footer' in '/opt/build/repo/src/com  ponents/Page'
  resolve '../Footer' in '/opt/build/repo/src/components/Page'
    using description file: /opt/build/repo/package.json (relative path: ./src/c  omponents/Page)
      Field 'browser' doesn't contain a valid alias configuration
      using description file: /opt/build/repo/package.json (relative path: ./src  /components/Footer)
        no extension
          Field 'browser' doesn't contain a valid alias configuration
          /opt/build/repo/src/components/Footer doesn't exist
        .js
          Field 'browser' doesn't contain a valid alias configuration
          /opt/build/repo/src/components/Footer.js doesn't exist
        .jsx
          Field 'browser' doesn't contain a valid alias configuration
          /opt/build/repo/src/components/Footer.jsx doesn't exist
        as directory
          /opt/build/repo/src/components/Footer doesn't exist
  [/opt/build/repo/src/components/Footer]
  [/opt/build/repo/src/components/Footer.js]
  [/opt/build/repo/src/components/Footer.jsx]
   @ ./src/components/Page/index.js 8:0-31 69:29-35
   @ ./src/templates/post.js
   @ ./.cache/async-requires.js
   @ ./.cache/production-app.js


  Error: ./src/templates/post.js
  Module not found: Error: Can't resolve '../components/PostView' in '/opt/build  /repo/src/templates'
  resolve '../components/PostView' in '/opt/build/repo/src/templates'
    using description file: /opt/build/repo/package.json (relative path: ./src/t  emplates)
      Field 'browser' doesn't contain a valid alias configuration
      using description file: /opt/build/repo/package.json (relative path: ./src  /components/PostView)
        no extension
          Field 'browser' doesn't contain a valid alias configuration
          /opt/build/repo/src/components/PostView doesn't exist
        .js
          Field 'browser' doesn't contain a valid alias configuration
          /opt/build/repo/src/components/PostView.js doesn't exist
        .jsx
          Field 'browser' doesn't contain a valid alias configuration
          /opt/build/repo/src/components/PostView.jsx doesn't exist
        as directory
          /opt/build/repo/src/components/PostView doesn't exist
  [/opt/build/repo/src/components/PostView]
  [/opt/build/repo/src/components/PostView.js]
  [/opt/build/repo/src/components/PostView.jsx]
   @ ./src/templates/post.js 5:0-46 16:26-34
   @ ./.cache/async-requires.js
   @ ./.cache/production-app.js

ํ™˜๊ฒฝ

  System:
    OS: macOS High Sierra 10.13.6
    CPU: x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.10.0 - ~/.nvm/versions/node/v10.10.0/bin/node
    Yarn: 1.9.4 - /usr/local/bin/yarn
    npm: 6.4.1 - ~/.nvm/versions/node/v10.10.0/bin/npm
  Browsers:
    Safari: 11.1.2
  npmPackages:
    gatsby: ^2.0.0-rc.25 => 2.0.0-rc.25 
    gatsby-plugin-react-helmet: ^3.0.0-rc.1 => 3.0.0-rc.1 
    gatsby-plugin-styled-components: ^3.0.0-rc.5 => 3.0.0-rc.5 
    gatsby-source-filesystem: ^2.0.1-rc.6 => 2.0.1-rc.6 
    gatsby-transformer-remark: ^2.1.1-rc.5 => 2.1.1-rc.5 

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

๋‚˜๋Š” ๋˜ํ•œ์ด ๊ฐ™์€ ๋ฌธ์ œ์— ๋Œ€ํ•ด ์„œํด์— ํƒ€๊ณ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.

์ด๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ๊ทธ๊ฒƒ์„ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค.

git config core.ignorecase false

๋Œ€์†Œ๋ฌธ์ž๋ฅผ ๊ตฌ๋ถ„ํ•˜๋Š” ํŒŒ์ผ ์ด๋ฆ„ ๋ณ€๊ฒฝ์— ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•œ ์ ์ด ์—†์Šต๋‹ˆ๋‹ค.
์šฐ์—ฐ์˜ ์ผ์น˜์˜€๊ฑฐ๋‚˜ Gatsby v2 Starter์˜ ์ผ๋ถ€์ธ๊ฐ€์š”??

๋ชจ๋“  5 ๋Œ“๊ธ€

ํ•„์š”ํ•œ ๊ฒƒ๊ณผ ํŒŒ์ผ ์ด๋ฆ„์— ๋Œ€์†Œ๋ฌธ์ž๊ฐ€ ๋‹ค๋ฅด๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค. ์ด๊ฒƒ์€ Mac์—์„œ ์ž‘๋™ํ•˜๊ณ  Linux์—์„œ๋Š” ์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

๋‚˜๋Š” ๋˜ํ•œ์ด ๊ฐ™์€ ๋ฌธ์ œ์— ๋Œ€ํ•ด ์„œํด์— ํƒ€๊ณ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.

์ด๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ๊ทธ๊ฒƒ์„ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค.

git config core.ignorecase false

๋Œ€์†Œ๋ฌธ์ž๋ฅผ ๊ตฌ๋ถ„ํ•˜๋Š” ํŒŒ์ผ ์ด๋ฆ„ ๋ณ€๊ฒฝ์— ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•œ ์ ์ด ์—†์Šต๋‹ˆ๋‹ค.
์šฐ์—ฐ์˜ ์ผ์น˜์˜€๊ฑฐ๋‚˜ Gatsby v2 Starter์˜ ์ผ๋ถ€์ธ๊ฐ€์š”??

๋„์ปค ์ปจํ…Œ์ด๋„ˆ๋กœ ํ‘ธ์‹œํ•˜๋Š” ๋™์•ˆ ์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ๋ฌด์—‡์ž…๋‹ˆ๊นŒ?

๋‚˜๋Š” ๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ์žˆ์—ˆ๊ณ  ์ˆ˜๋™์œผ๋กœ ๊ฐ€์ ธ์˜ค๊ธฐ๋ฅผ ๋ณ€๊ฒฝํ•˜์—ฌ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.

์ „์—:
import Features from "../components/features/features";
ํ›„์—:
import Features from "../components/features/Features";

StackOverFlow์˜ talve ์— ๋Œ€ํ•œ ํฌ๋ ˆ๋”ง

๋ฐฉ๊ธˆ ๊ฐ™์€ ์‹ค์ˆ˜์— ๋ถ€๋”ช์ณค์Šต๋‹ˆ๋‹ค. ์ด๊ฒƒ์€ ๊ฐœ๋ฐœ์— ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•ด์•ผ ํ•˜๋Š” ๊ฒƒ ์•„๋‹Œ๊ฐ€์š”?

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰