Shopify / slate

Slate is a toolkit for developing Shopify themes. It's designed to assist your workflow and speed up the process of developing, testing, and deploying themes.
https://shopify.github.io/slate
MIT License
1.28k stars 365 forks source link

Can't run the start script after updating slate-tools package #549

Closed lmartins closed 6 years ago

lmartins commented 6 years ago

Problem

I've been experimenting with Slate in the hopes of being able to use it for our theme builds. This morning I've updated the NPM dependencies, which included an update to @shopify/slate-tools.

After that, I've stopped being able to run the start script, always getting the following error message:

ERROR in ../node_modules/@shopify/slate-tools/tools/webpack/static-files-glob.js
Module not found: Error: Can't resolve '__appstatic__' in '/Volumes/T5/Sites/Shopify/goodwinmedia-slate/node_modules/@shopify/slate-tools/tools/webpack'
 @ ../node_modules/@shopify/slate-tools/tools/webpack/static-files-glob.js 31:0-38
 @ multi ../node_modules/@shopify/slate-tools/tools/webpack/hot-client.js ../node_modules/@shopify/slate-tools/tools/webpack/static-files-glob.js

package.json contents

{
  "name": "gwm-slate",
  "version": "1.0.0-alpha.1",
  "private": true,
  "description": "",
  "license": "MIT",
  "devDependencies": {
    "@shopify/slate-tools": ">=1.0.0-alpha.28",
    "babel-preset-shopify": "^16.2.0",
    "eslint-plugin-shopify": "^19.0.0",
    "stylelint-config-prettier": "^3.0.4",
    "stylelint-config-shopify": "^5.0.0"
  },
  "dependencies": {
    "@shopify/theme-a11y": "^1.0.0-alpha.3",
    "@shopify/theme-cart": "^1.0.0-alpha.3",
    "@shopify/theme-currency": "^1.0.0-alpha.3",
    "@shopify/theme-images": "^1.0.0-alpha.3",
    "@shopify/theme-rte": "^1.0.0-alpha.3",
    "@shopify/theme-sections": "^1.0.0-alpha.4",
    "@shopify/theme-variants": "^1.0.0-alpha.4",
    "family.scss": "^1.0.8",
    "jquery": "^3.2.1",
    "lazysizes": "^4.0.2",
    "lodash-es": "^4.17.4",
    "modularscale-sass": "^3.0.5",
    "normalize.css": "^7.0.0",
    "sass-mq": "^4.0.2"
  },
  "scripts": {
    "start": "slate-tools start",
    "watch": "slate-tools start --skipFirstDeploy",
    "build": "slate-tools build",
    "deploy": "slate-tools build && slate-tools deploy",
    "zip": "slate-tools build && slate-tools zip",
    "lint": "slate-tools lint",
    "format": "slate-tools format"
  }
}
ErikFontanel commented 6 years ago

I've encountered this issue too, but I'm on "@shopify/slate-tools": ">=1.0.0-alpha.29"

dangreaves commented 6 years ago

I fixed this by upgrading @shopify/slate-tools to 1.0.0-beta.1.

t-kelly commented 6 years ago

@lmartins @ErikFontanel -- looks like the semver range I've been using in shopify/starter-theme were not as refined as I thought they were 😅. The error you are getting is because NPM installed @shopify/slate-tools@1.0.0-beta.1 on your machine and is not looking for a src/assets/static folder instead of a src/assets/vendors folder (See breaking changes in the beta.1 release).

Two fixes you could choose: a. Upgrade to slate-tools@1.0.0-beta.1 and fix the breaking changes mentioned in the release b. In your package JSON, specify the precise version, in your case "@shopify/slate-tools": "1.0.0-alpha.28"

lmartins commented 6 years ago

@t-kelly Thomas, sorry I've missed these notifications. I will give a try. Thanks so much for the update and suggested fixes!

ErikFontanel commented 6 years ago

@t-kelly thanks, I resolved it last week by switching to the beta and starting a new project. It then occurred to me that I was experiencing the issue with the shopify/skeleton-theme and not with the starter-theme. I haven't retested it with skeleton though.

lmartins commented 6 years ago

@t-kelly should I close this one? It has been working just fine since I've followed your instructions. Thanks!

lock[bot] commented 6 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.