-
Notifications
You must be signed in to change notification settings - Fork 298
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
ReferenceError: Image is not defined #202
Comments
If it's working locally but not during deployment the Build your project locally, run that build locally and see if it's working as intended. You can also preview built project structure manually to see if your images are in right place. For the sake of calmness you can also check simple Might want to also check this: https://stackoverflow.com/questions/62920713/react-unable-to-render-images-on-heroku. |
thanks @trolit Yup also tried the npm run build then npm run start it works flawlessly. |
I'm sorry but I don't understand if you mean that you've solved the problem already or you checked build and images are working there as intended 😄 If second option, please make sure that you are using proper scripts because The build folder is ready to be deployed.
You may serve it with a static server:
npm install -g serve
serve -s build |
I have problem referencing local images in Nextjs. Here is a Slider component I define:
the house.png image is in the same folder as the Slider component |
Everything works fine locally but when i tried deploying it on Heroku, build fails with message:
The text was updated successfully, but these errors were encountered: