Issue 1:
I deployed my app on heroku and it returns a 404 error if I disable file system routing and use a custom route file. I also use express server.

I use next-routes library and here is my source files.

routes.js

const routes = module.exports = require('next-routes')();

routes
.add({name: 'community', pattern: '/community', page: 'profiles'})
.add({name: 'locations', pattern: '/community/locations', page: 'locations'})
.add({name: 'categories', pattern: '/community/categories', page: 'categories'})
.add({name: 'talents', pattern: '/community/talents', page: 'talents'})
.add({name:'dashboard', pattern: '/dashboard', page: 'dashboard'})
.add({name:'pricing', pattern: '/pricing', page: 'pricing'})
.add({name: 'blog', pattern: '/blog', page: 'blog'})
.add({name: 'blog_item', pattern: '/blog/:slug', page:'blog_item'})
.add({name: 'login', pattern: '/login', page:'login'})
.add({name: 'signup', pattern: '/signup', page:'signup'})
.add({name: 'reset', pattern: '/reset', page: 'reset'})
.add({name: 'auth', pattern: '/auth', page: 'auth'})
.add({name: 'equipments', pattern: '/profile/equipments', page: 'equipments'})
.add({name: 'connections', pattern: '/profile/connections', page: 'connections'})
.add({name: 'passwordreset', pattern: '/password/reset', page: 'passwordreset'})
.add({name: 'about', pattern: '/profile/about', page: 'about'})

server.js

const express = require('express');
const compression = require('compression');
const next = require('next');

const http = require('http');

const dev = process.env.NODE_ENV !== 'production';
const PORT = process.env.PORT || 3000;

const app = next({dev });

const routes = require('./routes')
const handler = routes.getRequestHandler(app, ({req, res, route, query}) => {

app.render(req, res, route.page, query)
})

app.prepare().then(() => {

const server = express()

if (process.env.NODE_ENV === "production") {
//server.use( compression() );
}

server.use( handler )

var httpServer = http.createServer(server);

httpServer.listen(PORT, (err) => {
if (err) throw err;
console.log(`> Ready on http://localhost:${PORT}`);
});
});

next.config.js

const withSass = require('@zeit/next-sass')

const getRoutes = require('./src/routes')

module.exports = withSass({
cssModules: false,

exportPathMap: getRoutes,
useFileSystemPublicRoutes: false
})

package.json

"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "node ./src/server.js",
"build": "next build",
"start": "node ./src/server.js -p $PORT",
"heroku-postbuild": "next build"
},

I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

I expect the app to run flawlessly because it works on development.

Environment

Tech
Version

next
6.0.0

node
v8.9.1

OS
Mac OS X Sierra

browser
All

deployed
heroku

Issue 2:
npm install next fails with error:

npm ERR! 404 Not Found: @zeit/check-updates@1.1.0

I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Current Behavior

Steps to Reproduce (for bugs)

Following instructions here: https://learnnextjs.com/basics/getting-started/setup

npm install next should succeed

Context

Your Environment

Tech
Version

next
5.6.0

node
9.5.0

OS
OSX 10.12.6

browser

etc