• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zeit / next.js / 8682 / 1
52%
master: 52%

Build:
DEFAULT BRANCH: master
Ran 10 Dec 2018 11:27AM UTC
Files 85
Run time 18s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

10 Dec 2018 11:14AM UTC coverage: 82.368%. Remained the same
8682.1

push

travis-ci

timneutkens
Fix paths when built on windows (#5795)

This PR Fixes #4920

So the problem is that when a next.js application is built on windows, the `pages-manifest.json` file is created with backslashes. If this built application is deployed to a linux hosting enviroment, the server will fail when trying to load the modules.

```
Error: Cannot find module '/user_code/next/server/bundles\pages\index.js
```

My simple solution is to modify the `pages-manifest.json` to always use linux separator (`/`), then also 
modify `server/require.js` to, when requiring page, replace any separator (`\` or `/`) with current platform-specific file separator (`require('path').sep`).

The fix in `server/require.js` would be sufficient, but my opinion is that having some cross-platform consistency is nice.

This change was tested by bulding an application in windows and running it in linux and windows, aswell as building an application in linux and running it in linux and windows. The related tests was also run.

760 of 2092 branches covered (36.33%)

3457 of 4197 relevant lines covered (82.37%)

5.05 hits per line

Source Files on job 8682.1
  • Tree
  • List 0
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 7873
  • Travis Job 8682.1
  • c867b0ce on github
  • Prev Job for on master (#8006.1)
  • Next Job for on master (#8701.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc