slate
slate copied to clipboard
Slate Commands no longer running after node upgrade
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.
@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 :(
Any particular reason you absolutely need the latest node? If it's urgent I would suggest downgrading Node
I believe I had to update for a separate project. Which in hindsight is exactly what something like NVM is for.
How we Iām not entirely sure which version of node would resolve this issue.
--Sent from Jean-Ralphio the iPhone
On Nov 1, 2018, at 4:07 PM, Hugues Tennier [email protected] wrote:
Any particular reason you absolutely need the latest node? If it's urgent I would suggest downgrading Node
ā You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Should work no problem with Node v8.11.1
@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!
This is a bug in the natives
dependency and needs to be updated to at least 1.1.1
I believe.
https://github.com/isaacs/natives/issues/14
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:
- 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)
- Now
cd
using that path to theslate
directory. In this case:
cd /usr/local/lib/node_modules/@shopify/slate
- 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
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
Using nvm to switch to 8.11.1 for Slate v0 development also worked for me. š Thanks all.