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

uikit-workshop 5.5.0 crashes during serve when adding an empty pattern file #1114

Closed
ringods opened this issue Jan 6, 2020 · 14 comments
Closed
Labels
core pinned 📌 Don't let stalebot clean this up triage 😰

Comments

@ringods
Copy link
Contributor

ringods commented Jan 6, 2020

I am using Pattern Lab Node v5.5.0 on Mac, with Node v13.5.0, using a Custom Edition.

Expected Behavior

patternlab serve should rebuild and reload correctly when I add a new empty pattern in any of the pattern folders.

Actual Behavior

When I add an empty pattern file in any of the pattern folders, the patterns are rebuilt but then patternlab serve crashes on me:

...
Built pattern: templates-home
Built pattern: pages-home
Built pattern: pages-welcome
Omitting pages-welcome from styleguide patterns because it is defined as a defaultPattern.
Built Pattern Lab front end
Assertion failed: (0), function uv_close, file ../deps/uv/src/unix/core.c, line 187.
[1]    90622 abort      npm run pl:serve
Time: 0h:00m:42s
Steps to Reproduce

Use @patternlab/uikit-workshop v5.5.0 in devDependencies of my setup. When I revert to v5.4.0, the error is gone.

@sghoweri
Copy link
Contributor

sghoweri commented Jan 9, 2020

Thanks for submitting this @ringods!

We'll need to do some digging however my initial suspicion is that this might have something to do with Node v13 (vs Node v12). 🤔

@ringods
Copy link
Contributor Author

ringods commented Jan 9, 2020

@sghoweri In the meantime, I switched to Node v12 too and the problems are gone. So you suspicion makes sense. ;-)

@maxleistner
Copy link
Contributor

Hi there. I am on node v12.3.6 and the error pops up again.
(Pattern Lab Node Core version: 5.10.1)

Any suggestions?

@jeffwhitfield
Copy link

Happening for me too. Just randomly happens without any rhyme or reason...even after just a simple edit to an HBS file. Very annoying since it constantly interrupts my workflow. :(

Built pattern: pages-collection
Built pattern: pages-product
Omitting atoms-colors from styleguide patterns because it has an underscore prefix.
Built Pattern Lab front end
Assertion failed: (0), function uv_close, file ../deps/uv/src/unix/core.c, line 174.
[1]    57247 abort      npm run serve

Running on Node 14.12.0 with the following Pattern Lab dependencies:

    "@pattern-lab/cli": "^5.13.1",
    "@pattern-lab/core": "^5.13.1",
    "@pattern-lab/engine-handlebars": "^5.10.1",
    "@pattern-lab/starterkit-handlebars-demo": "^5.11.1",
    "@pattern-lab/uikit-workshop": "^5.13.1",
    "create-pattern-lab": "^5.13.1",

Being that it happens on other versions of Node makes it rather unlikely it's just a simple Node issue. :P

@sdlambert
Copy link

Assertion failed: (0), function uv_close, file ../deps/uv/src/unix/core.c, line 174.

I am getting this error on Node v 12.16.3 with the latest Pattern Lab, as well. The issue persists even when rolling back to 5.13.1 as suggested above. This is on a fresh install.

@JosefBredereck JosefBredereck reopened this Dec 3, 2020
@JosefBredereck
Copy link
Contributor

@jeffwhitfield @sdlambert, can one of you tell me what exactly you did and which operating system you use?

I tested this with a fresh installation and added, deleted, and even renamed empty patterns or any other pattern.
Are you using npm or yarn?

@jeffwhitfield
Copy link

@joekarasek I'm currently on macOS Big Sur v11.1 using Node v12.2. Here's what's in my package.json file if that helps any:

{
  "name": "hcp-design-system",
  "version": "1.0.0",
  "description": "HCP app design system and component library",
  "main": "index.js",
  "scripts": {
    "pl:build": "patternlab build --config ./patternlab-config.json",
    "pl:help": "patternlab --help",
    "pl:install": "patternlab install --config ./patternlab-config.json",
    "pl:serve": "patternlab serve --config ./patternlab-config.json",
    "pl:version": "patternlab --version",
    "build": "patternlab build --config ./patternlab-config.json",
    "serve": "patternlab serve --config ./patternlab-config.json",
    "dev": "npm run development",
    "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch": "npm run development -- --watch",
    "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
    "prod": "npm run production",
    "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
  },
  "author": "Jeff Whitfield",
  "license": "ISC",
  "devDependencies": {
    "@pattern-lab/cli": "^5.13.2",
    "@pattern-lab/core": "^5.13.2",
    "@pattern-lab/engine-handlebars": "^5.10.1",
    "@pattern-lab/starterkit-handlebars-vanilla": "^1.4.0",
    "@pattern-lab/uikit-workshop": "^5.13.2",
    "create-pattern-lab": "^5.13.2",
    "cross-env": "^7.0.3",
    "laravel-mix": "^5.0.9",
    "sass": "^1.30.0",
    "sass-loader": "^8.0.2",
    "tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.0.1",
    "vue-template-compiler": "^2.6.12"
  },
  "dependencies": {}
}

@jeffwhitfield
Copy link

Yeah, it's virtually unusable now due to all the uv_close crashes. There's a mention of this error here:

webpack/webpack#10037

Might be due to issues with Webpack. As it stands though, I'll likely need to just stop using Pattern Lab till it's fixed. :(

@StfBauer
Copy link
Contributor

Happens from time to time in my setup as well:

{
  "name": "liquid-core",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "pl:build": "patternlab build --config ./patternlab-config.json",
    "pl:publish": "patternlab build --config ./patternlab-public.json",
    "pl:help": "patternlab --help",
    "pl:install": "patternlab install --config ./patternlab-config.json",
    "pl:serve": "patternlab serve --config ./patternlab-config.json",
    "gulp:serve": "gulp",
    "gulp:serveStyles2": "gulp serveStyles2",
    "pl:version": "patternlab --version"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "@pattern-lab/cli": "^5.14.1",
    "@pattern-lab/core": "^5.14.1",
    "@pattern-lab/engine-handlebars": "^5.14.0",
    "@pattern-lab/uikit-workshop": "^5.14.1",
    "postcss": "^8.2.6"
  },
  "devDependencies": {
    "gulp": "^4.0.2",
    "gulp-autoprefixer": "^7.0.1",
    "gulp-load-plugins": "^2.0.6",
    "gulp-plumber": "^1.2.1",
    "gulp-postcss": "^9.0.0",
    "gulp-sass": "^4.1.0",
    "gulp-sourcemaps": "^3.0.0",
    "node-sass": "^5.0.0",
    "npm-run-all": "^4.1.5"
  }
}

Tested NodeJS versions: 12, 14
NodeJS 13 is the only one that seems to work properly.

  • NodeJS ATM: v12.21.0
  • NPM version: 6.14.11

@mfranzke
Copy link
Contributor

I'm sadly only able to reproduce this issue sporadically, but will provide updates to packages of the main possible causes (chokidar and webpack) with some merge requests.

@StfBauer
Copy link
Contributor

@mfranzke What I recognized is that it happens when having an issue in the handlebars file in my case and save it. At least what I have recognized it.

@mfranzke
Copy link
Contributor

mfranzke commented Sep 3, 2021

@StfBauer are you still experiencing this even after the latest updates, or could we close this ticket ?

@mfranzke
Copy link
Contributor

@jeffwhitfield are you still experiencing this even after the latest updates, or could we close this ticket ?

@StfBauer
Copy link
Contributor

@mfranzke Never had this issue with the current version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core pinned 📌 Don't let stalebot clean this up triage 😰
Projects
None yet
Development

No branches or pull requests

9 participants