Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node.js 9: Сrash when trying to install a new project (bug) #10956

Closed
PinkyRabbit opened this issue Feb 19, 2018 · 10 comments
Closed

Node.js 9: Сrash when trying to install a new project (bug) #10956

PinkyRabbit opened this issue Feb 19, 2018 · 10 comments
Assignees
Labels

Comments

@PinkyRabbit
Copy link

Hello. OS Ubuntu 16.04

How to reproduce this bug:

  1. I installed foundation by the guide
  2. Starts new project
  3. Try to start next project and app crashed

What should happen:

Installer must create files for new project

What happened instead:

Installer crushed. Terminal output:

usesa@pinkya-spot:/var/www/udemy-electron$ foundation new myApp
? What are you building today? A web app (Foundation for Apps)
? What's the project called? (no spaces) styles

           /|
          | |  /| ,
     .  /\|  \/ |/|
     |\/          |       Thanks for using ZURB Foundation for Apps!
     ||\__/\____/||       -------------------------------------------
  ___|| ======== ||___    Let's set up a new project.
 /___||  O    O  ||___\   It shouldn't take more than a minute.
     ||  ______, || 
     /|          |\
    /_/\\/\  /\//\_\
        \/\\//\/
           \/


Downloading the project template...
Done downloading!

Installing dependencies...

/usr/local/lib/node_modules/foundation-cli/node_modules/npm/node_modules/tar/lib/entry.js:165
  ;["path", "linkpath"].forEach(function (p) {
                        ^

TypeError: Cannot use 'in' operator to search for '0' in arguments_marker
    at forEach (<anonymous>)
    at Entry._setProps (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/node_modules/tar/lib/entry.js:165:25)
    at new Entry (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/node_modules/tar/lib/entry.js:46:8)
    at Extract.Parse._startEntry (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/node_modules/tar/lib/parse.js:241:11)
    at Extract.Parse._process (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/node_modules/tar/lib/parse.js:131:12)
    at BlockStream.<anonymous> (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/node_modules/tar/lib/parse.js:47:8)
    at emitOne (events.js:125:13)
    at BlockStream.emit (events.js:221:7)
    at BlockStream._emitChunk (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/node_modules/block-stream/block-stream.js:145:10)
    at BlockStream.resume (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/node_modules/block-stream/block-stream.js:58:15)

Browser(s) and Device(s) tested on:

OS Ubuntu 16.04

Foundation Version(s) you are using:

Foundation CLI version 2.2.5

@DanielRuf
Copy link
Contributor

What is your npm and Node.js version?

@DanielRuf
Copy link
Contributor

DanielRuf commented Feb 19, 2018

Possibly related: nodejs/node#16781

It seems to be an issue in v8 (the Node.js engine). Can you try nvm to use Node.js 8 with npm 5 instead of Node.js 9 (if you are using Node.js 9)?

@PinkyRabbit
Copy link
Author

PinkyRabbit commented Feb 19, 2018

@DanielRuf , yes i have 9 version of node. Ok, I'll try what you suggest to me now. But first time project installed w/o any errors.
🚀 🚀 🚀
upd. Problem solved. Node v8.9.4 project created all looks fine. Thank you!

@DanielRuf
Copy link
Contributor

Great. So it seems there is a bug in Node.js 9. We should track this one.

@ncoden ncoden added the cli label Feb 19, 2018
@DanielRuf DanielRuf changed the title Сrash when trying to install a new project Node.js 9: Сrash when trying to install a new project (bug) Feb 19, 2018
@DanielRuf
Copy link
Contributor

It seems 9.5.0 has this fix.

nodejs/node@6ddba2e

https://github.com/nodejs/node/blob/v9.5.0/deps/v8/src/flag-definitions.h

Can you verify this?

@DanielRuf
Copy link
Contributor

turbo_inline_array_builtins

@DanielRuf
Copy link
Contributor

DanielRuf commented Feb 20, 2018

The last release which had this flag enabled was Node.js 9.1.0.

Node.js 9.2.0 was the first release which contains the fix and should work.
So Node.js 9.2.0 and newer should work again.

https://github.com/nodejs/node/blob/v9.1.0/deps/v8/src/flag-definitions.h

https://github.com/nodejs/node/blob/v9.2.0/deps/v8/src/flag-definitions.h

@DanielRuf DanielRuf self-assigned this Feb 20, 2018
@PinkyRabbit
Copy link
Author

PinkyRabbit commented Feb 20, 2018

NodeJS v 9.5.0

You're all set!

 ✓ New project folder created.
 ✓ Node modules installed.
 ✓ Bower components installed.

Now run foundation watch while inside the myapp2 folder.

Looks all fine. I thought I installed version 9.0.0 with apt-update. nvm is really awesome tool. Thanks one more time!

@DanielRuf
Copy link
Contributor

Thanks for the fast feedback. I'll close this issue as this is fixed in the latest Node.js releases.

@DanielRuf
Copy link
Contributor

nvm is really awesome tool. Thanks one more time!

You are welcome.
Thanks for reporting this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants