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

zeit / next.js / 8682
52%

Build:
DEFAULT BRANCH: master
Ran 10 Dec 2018 11:26AM UTC
Jobs 1
Files 85
Run time 25s
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

pending completion
8682

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

Jobs
ID Job ID Ran Files Coverage
1 8682.1 10 Dec 2018 11:26AM UTC 0
82.37
Travis Job 8682.1
Source Files on build 8682
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #8682
  • c867b0ce on github
  • Prev Build on master (#8006)
  • Next Build on master (#8701)
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