Skip to content

Unhandled promise rejection during 'npm run patternlab serve' causing patterns not being displayed #937

@piotscig

Description

@piotscig

I am using Pattern Lab Node v3.0.0-alpha.16 on Linux (KDE neon User Edition 5.13), with Node v10.8.0, using a Node Edition.

'node -v': v10.8.0
'npm -v': 6.4.1

Expected Behavior

After 'npm run patternlab serve' patterns should be displayed

Actual Behavior

Patterns are only displayed in top menu, but after clicking them nothing happens.
Atom .html file in /source is being built correctly

Steps to Reproduce

mkdir test-patternlab
cd test-patternlab
npm init -y && npx @pattern-lab/cli -c patternlab init

Directory for Pattern Lab project: // [ENTER], empty input
Edition: edition-node
Starter kit: starterkit-mustache-demo
Y

sudo npm install

// adding required line to package.json

sudo npm run patternlab build
sudo npm run patternlab serve

=======
Output:

test-patternlab@1.0.0 patternlab /mnt/4F44EAD3553B133C/Strona017-StartUp/test-patternlab
patternlab "serve"

Pattern Lab Node v3.0.0-alpha.16
Pattern Engine mustache: good to go
Incremental builds enabled.

Found a lower common denominator pattern state: inreview on molecules-block-media. Setting reverse lineage pattern organisms-media-list from <>
[...]

Built Pattern Lab front end
⊙ patternlab → build: Yay, your Pattern Lab project was successfully built ☺
⊙ patternlab → serve: Serving your files …
Pattern Lab Node v3.0.0-alpha.16
Pattern Lab Node v3.0.0-alpha.16
Pattern Engine mustache: already loaded, skipping.
Pattern Engine mustache: already loaded, skipping.
Incremental builds enabled.
Incremental builds enabled.

Found a lower common denominator pattern state: inreview on molecules-block-media. Setting reverse lineage pattern organisms-media-list from <>
[...]

Built Pattern Lab front end
Built Pattern Lab front end
Pattern Lab is watching for changes to files under source/
Pattern Lab is watching for changes to files under source/
Pattern Lab is being served from http://127.0.0.1:3000
Pattern Lab is being served from http://127.0.0.1:3000
(node:18688) UnhandledPromiseRejectionWarning: Error: Exited with code 3
at ChildProcess.cp.once.code (/mnt/4F44EAD3553B133C/Strona017-StartUp/test-patternlab/node_modules/opn/index.js:84:13)
at Object.onceWrapper (events.js:273:13)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:962:16)
at Socket.stream.socket.on (internal/child_process.js:381:11)
at Socket.emit (events.js:182:13)
at Pipe._handle.close (net.js:599:12)
(node:18688) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:18688) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

And patternlab doesn't work properly any more...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions