question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't resolve paths from index.html after npm run build

See original GitHub issue

After building an app into /dist folder index.html references all resources (minified .css, .js and images) as /resource_name instead of ./resources_name. Manually replacing / to ./ in webpack.config.prod.js:output.publicPath or in index.html fixes the problem.

Am I doing something wrong that I have to do it manually?

P.S. The issue does not affect the dist server.

Node version: 6.9.2

npm version: 3.10.9

Operating system: macOS 10.12.3

Command line used: npm run build (excluded linting and testing)

Steps to reproduce: npm run build

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
iamimcommented, Apr 8, 2017

I created a short note in FAQ on this topic.

1reaction
coryhousecommented, Apr 5, 2017

I agree that a deploy section would be useful, and likely expose us to opportunities for improvement. I’d welcome a related PR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't resolve paths from index.html after npm run build
I run this command to build my project: npm run build. but I cannot find index.html file and other .js files. my webpack.config.js...
Read more >
Build & Deploy - Hands on React
npm run build creates a build directory with a production build of your app. Set up your favorite HTTP server so that a...
Read more >
Creating a React app with Webpack - JavaScript Ramblings
Simple step by step walkthrough of setting up a React app with Webpack.
Read more >
Using React with TypeScript - Mattermost
React is a JavaScript library that enables developers to build full-fledged applications in a modular structure.
Read more >
Create React App: import modules using aliases ... - Wavelop
in this way, the Typescript compiler will be able to resolve paths. Reorganize the files. Now we are going to re-organize the file...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found