Next.js: `next build` on canary using full path in transpiled require statements

Created on 4 Jan 2018  路  3Comments  路  Source: vercel/next.js

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

Expected Behavior



next build does not include absolute path to node module

Current Behavior



next build includes absolute path in transpiled require path

Steps to Reproduce (for bugs)

Correct

yarn add [email protected]
next build

# Transpiled output
var _extends2 = require('babel-runtime/helpers/extends');

Incorrect

yarn add next@canary
next build

# Transpiled output
var _extends2 = require('/Users/kyle/projects/test/node_modules/babel-runtime/helpers/extends');

Context



Unable to deploy to lambda using up due to up building locally and uploading zip file to s3 rendering absolute paths invalid

Your Environment


| Tech | Version |
|---------|---------|
| next | canary |
| node | 8.9.0 |
| OS | macos 10.13.2 |

bug

Most helpful comment

Created a pull request 馃檹 I had actually already fixed the babel-runtime issue. The pages issue is a new one 馃憤

All 3 comments

Same problem - see ^^ postmortem. Also serverless environment deployed from Travis-CI.

Created a pull request 馃檹 I had actually already fixed the babel-runtime issue. The pages issue is a new one 馃憤

Was this page helpful?
0 / 5 - 0 ratings