0

I'm having some issues deploying to netlify. These are the errors I receive:

Error: ./src/pages/index.js 12:55:30 PM: Module not found: Error: Can't resolve '../components/Featured' in '/opt/build /repo/src/pages' 12:55:30 PM: resolve '../components/Featured' in '/opt/build/repo/src/pages' 12:55:30 PM: using description file: /opt/build/repo/package.json (relative path: ./src/p ages) 12:55:30 PM: Field 'browser' doesn't contain a valid alias configuration

For some reason it can't find the components. Building locally works fine.

I used gatsby-starter w styled-components.

things I tried: I had some local building errors regarding the window undefined. I fixed these by conditionally including them as the manual proposes.

After applying this, I started receiving console logs from ‘workbox’.

(btw this is my first time trying to deploy to netlify) also the error Field 'browser' doesn't contain a valid alias configuration keeps repeating in the logs

here's a link to the full log I get from netlify

2 Answers 2

4

The errors are due to webpack not being able to resolve your relative paths. Make sure to use the correct case.

import Hero from '../components/hero'
import Introduce from '../components/introduce'
import HelpMeHelpYou from '../components/helpmehelpyou'
import Featured from '../components/featured'
import Testimonials from '../components/testimonials'
import Projects from '../components/projects'
import Gallery from '../components/gallery'
import Outroduce from '../components/outroduce'

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

0

Run below command and then push the code to Github repository.

git config core.ignorecase false

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.