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.

Deployment Error on NOW

See original GitHub issue

Next.js version: 6.0.2

  1. Build a simple Next.js project by
mkdir next-test
cd next-test
npm init -y
npm install --save react react-dom next
  1. Add deploy scripts to package.json
  "scripts": {
    "dev": "next",
    "build": "next build",
    "start": "next start"
  }
  1. Deploy to NOW
now

Error shows up during the build log:

Deploying ~/projects/tmp/next-test under ###

Using Node.js 8.11.1 (default) https://next-test-cqdudbobrb.now.sh [in clipboard] (sfo1) [5s] Synced 9 files (306.47KB) [5s] Building… ▲ npm install ✓ Using “package-lock.json” ⧗ Installing 3 main dependencies… events.js:183 Error: Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?

at Object.exports.decode (/snapshot/ace/node_modules/tar-stream/headers.js:270:43)
at Extract.onheader [as _onparse] (/snapshot/ace/node_modules/tar-stream/extract.js:120:39)
at Extract._write (/snapshot/ace/node_modules/tar-stream/extract.js:243:8)
at Extract._continue (/snapshot/ace/node_modules/tar-stream/extract.js:207:28)
at oncontinue (/snapshot/ace/node_modules/tar-stream/extract.js:64:10)
at Extract.onheader [as _onparse] (/snapshot/ace/node_modules/tar-stream/extract.js:128:7)
at Extract._write (/snapshot/ace/node_modules/tar-stream/extract.js:243:8)
at Extract._continue (/snapshot/ace/node_modules/tar-stream/extract.js:207:28)
at oncontinue (/snapshot/ace/node_modules/tar-stream/extract.js:64:10)
at Extract.ondrain (/snapshot/ace/node_modules/tar-stream/extract.js:84:5)
  throw er; // Unhandled 'error' event
  ^

▲ npm install

uglifyjs-webpack-plugin@0.4.6 postinstall /home/nowuser/src/node_modules/webpack/node_modules/uglifyjs-webpack-plugin node lib/post_install.js

npm WARN next-test@1.0.0 No description npm WARN next-test@1.0.0 No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.3 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.3: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})

added 682 packages in 7.522s ▲ npm run build

next-test@1.0.0 build /home/nowuser/src next build

▲ Snapshotting deployment ▲ Saving deployment image (10.8M) Build completed Verifying instantiation in sfo1

App runs fine on the server. Seems some libraries are missing on the now for next.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
williamlicommented, May 15, 2018

@TooTallNate not sure if related, (I haven’t changed code in my project), but now npm packages I used randomly failed during the build stage in NOW.

the app still works and get deployed on the server.

Example 1: Error: Error parsing package.json for fsevents-1.2.3.tar

Building… ▲ npm install ✓ Using “package-lock.json” ⧗ Installing 10 main dependencies… Building “fsevents@1.2.3” remotely Building “styled-components@3.2.6” remotely Building “uglifyjs-webpack-plugin@0.4.6” remotely Building “fsevents@1.2.3” remotely Building “uglifyjs-webpack-plugin@0.4.6” remotely Building “styled-components@3.2.6” remotely Building “fsevents@1.2.3” remotely Error: Error parsing package.json for fsevents-1.2.3.tar at extract (/snapshot/ace/lib/extract.js:36:11) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) ▲ npm install

Example 2: Error: Error parsing package.json for styled-components-3.2.6.tar

Synced 1 file (2.71KB) [5s]
Building…
▲ npm install
✓ Using “package-lock.json”
⧗ Installing 10 main dependencies…
Building “fsevents@1.2.3” remotely
Building “styled-components@3.2.6” remotely
Building “uglifyjs-webpack-plugin@0.4.6” remotely
Building “fsevents@1.2.3” remotely
Building “styled-components@3.2.6” remotely
Building “uglifyjs-webpack-plugin@0.4.6” remotely
Building “fsevents@1.2.3” remotely
Building “styled-components@3.2.6” remotely
Error: Error parsing package.json for styled-components-3.2.6.tar
at extract (/snapshot/ace/lib/extract.js:36:11)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Building “uglifyjs-webpack-plugin@0.4.6” remotely
▲ npm install

1reaction
trevordmillercommented, Jul 24, 2018

I’m also getting the “Error: Error parsing package.json for fsevents” on now 11.3.0 and next 6.1.1. Fixed when I upgraded to now 11.3.1.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot common Azure deployment errors
Error code Mitigation More inform... AccountNameInvalid Follow naming guidelines for storage accounts. Resolve erro... AccountPropertyCannotBeSet Check available storage account properties. storageAcco... AnotherOperationInProgress Wait for concurrent operation...
Read more >
Custom Object deployment error - Oracle B2C Service
Issue: I receive the following error when trying to deploy changes to Custom Objects: Deployments are currently disabled on this interface to ...
Read more >
Error :Deployment failed Subnet Subnet_XXX referen...
This error occurs when subnet that is used to provision vm is not in same availability set as other subnets in VM. Resolution...
Read more >
Identify and Fix Build and Deployment Errors in Your Angular ...
In this guide, you will learn how to spot some of the most common build and deployment errors and how to resolve them...
Read more >
An error "This page isn't working right now" shows in the web ...
Repro Steps: Create an advanced Windows Node web app and deploy the project to it. Create a Deployment slot for the above web...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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