Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Slate Commands no longer running after node upgrade #861

Open
patrickbjohnson opened this issue Nov 1, 2018 · 9 comments
Open

Slate Commands no longer running after node upgrade #861

patrickbjohnson opened this issue Nov 1, 2018 · 9 comments

Comments

@patrickbjohnson
Copy link

patrickbjohnson commented Nov 1, 2018

Problem

Pulled down existing site from Shopify. Migrated theme to Slate build.

Was using slate watch to run dev instance of theme.

Updated node to latest v11.0.0 and now slate commands fail.

slate watch
fs.js:25
'use strict';
^

ReferenceError: internalBinding is not defined
    at fs.js:25:1
    at req_ (/usr/local/lib/node_modules/@shopify/slate/node_modules/natives/index.js:137:5)
    at Object.req [as require] (/usr/local/lib/node_modules/@shopify/slate/node_modules/natives/index.js:54:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/@shopify/slate/node_modules/graceful-fs/fs.js:1:99)
    at Module._compile (internal/modules/cjs/loader.js:707:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:718:10)
    at Module.load (internal/modules/cjs/loader.js:605:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:544:12)
    at Function.Module._load (internal/modules/cjs/loader.js:536:3)
    at Module.require (internal/modules/cjs/loader.js:643:17)

I've tried re-installed. I've tried using yarn or npm commands to install modules again but nothing seems to work.

Currently running 0.13.0 of slate-tools

Additionally, I have a Slate v0 theme (non-migrated) which suffers from the same issue.

@patrickbjohnson patrickbjohnson changed the title Slate Watch no longer running after node upgrade Slate Commands no longer running after node upgrade Nov 1, 2018
@patrickbjohnson
Copy link
Author

@t-kelly not sure if the tags were automated but have y'all not see this issue before? Was looking here and ThemeKit's repo to try and find a resolution to the issue. Handful of paying clients awaiting those changes to go live :(

@huguestennier
Copy link
Contributor

Any particular reason you absolutely need the latest node? If it's urgent I would suggest downgrading Node

@patrickbjohnson
Copy link
Author

patrickbjohnson commented Nov 1, 2018 via email

@huguestennier
Copy link
Contributor

Should work no problem with Node v8.11.1

@patrickbjohnson
Copy link
Author

@huguestennier Adding nvm and rolling back to v8.11.1 has resolved my issue but still persists with latest version of node.

Thank you for your help!

@IngoVals
Copy link

IngoVals commented Nov 2, 2018

This is a bug in the natives dependency and needs to be updated to at least 1.1.1 I believe.

isaacs/natives#14

@jasonsemko
Copy link

Solution (for me)

This bug comes from "unzip2": "0.2.5", which as @IngoVals correctly states above uses a now outdated version of natives.

How I fixed this issue:

  1. Find the path natives is in. You can easily do this by looking at your error message. I'm on a mac so it's at the same place as @patrickbjohnson :
at req_ (/usr/local/lib/node_modules/@shopify/slate/node_modules/natives/index.js:137:5)
  1. Now cd using that path to the slate directory. In this case:
cd /usr/local/lib/node_modules/@shopify/slate
  1. All we need to do is update natives. I went ahead and uninstalled too:
npm uninstall natives
npm install natives 

That gave me the latest natives version and now slate works

@t-kelly t-kelly added ! and removed !! labels Dec 13, 2018
@aphillips8
Copy link

aphillips8 commented Dec 3, 2019

For me the fix was downgrading Node to 8.11.1 using nvm. I messed around with natives but that didn't work for me.

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
nvm install 8.11.1
nvm use 8.11.1

@gcamacho079
Copy link

Using nvm to switch to 8.11.1 for Slate v0 development also worked for me. 👍 Thanks all.

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

No branches or pull requests

7 participants