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

[Bug] Local Images not displaying #3

Closed
rayflores opened this issue Mar 25, 2021 · 4 comments
Closed

[Bug] Local Images not displaying #3

rayflores opened this issue Mar 25, 2021 · 4 comments
Labels
question Further information is requested

Comments

@rayflores
Copy link

Version

1.4.0

Reproduction link

https://codepen.io/rayflores/pen/JjEYQdP

Operating System

Windows 10

Device

Desktop

Browser & Version

Chrome - 89.0.4389.90 (Official Build) (64-bit)

Steps to reproduce

  1. npm install
  2. npm start
  3. http://localhost:3000 - view

What is expected?

images from local src/assets/img/~ should display properly

What is actually happening?

broken images


Solution

not sure...

Additional comments

from what I understand, it has something to do with file-loader and url-loader ( esModule: false ) ... but, I do not know how to change that...

@einazare
Copy link
Contributor

Hello there, @rayflores ,

Thank you for your interest in working with our products.
We've just tested the product:

  • Download a fresh copy of it
  • Run npm install
  • Run npm start
  • Checked all the pages for images
  • All images worked as expected

Please provide us the following video:

  • Download the product
  • Unzip the product
  • Open terminal and cd into the project
  • Run node -v
  • Run npm -v
  • Run npm install
  • Run npm start
  • Showcase the issue

Best,
Manu

@einazare einazare added the question Further information is requested label Mar 26, 2021
@rayflores
Copy link
Author

Thank you for your reply @einazare
Here are my results up to npm install

node: 15.11.0
npm: 7.6.3
$ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: @babel/core@7.9.0
npm ERR! node_modules/@babel/core
npm ERR!   @babel/core@"7.9.0" from react-scripts@3.4.1
npm ERR!   node_modules/react-scripts
npm ERR!     react-scripts@"3.4.1" from the root project
npm ERR!   @babel/core@"^7.4.5" from @svgr/webpack@4.3.3
npm ERR!   node_modules/@svgr/webpack
npm ERR!     @svgr/webpack@"4.3.3" from react-scripts@3.4.1
npm ERR!     node_modules/react-scripts
npm ERR!       react-scripts@"3.4.1" from the root project
npm ERR!   9 more (babel-jest, babel-loader, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @babel/core@"^7.13.0" from @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.13.12
npm ERR! node_modules/@babel/preset-env/node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining
npm ERR!   @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@"^7.13.12" from @babel/preset-env@7.13.12
npm ERR!   node_modules/@babel/preset-env
npm ERR!     @babel/preset-env@"^7.4.5" from @svgr/webpack@4.3.3
npm ERR!     node_modules/@svgr/webpack
npm ERR!       @svgr/webpack@"4.3.3" from react-scripts@3.4.1
npm ERR!       node_modules/react-scripts
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\ray\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ray\AppData\Local\npm-cache\_logs\2021-03-26T14_53_25_311Z-debug.log

@einazare
Copy link
Contributor

Hello again, @rayflores ,

Please install NodeJS LTS version: https://nodejs.org/en/
If you still have the issue after you install and use NodeJS LTS version, please provide us the following video:

  • Download the product
  • Unzip the product
  • Open terminal and cd into the project
  • Run node -v
  • Run npm -v
  • Run npm install
  • Run npm start
  • Showcase the issue

Best,
Manu

@rayflores
Copy link
Author

it seems that I needed to run build first... then the files were served from public folder... not sure why, but that is how it is working now...
thank you for your quick help here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants