nxtedition/create-caspar-graphics

compile error

Roberto-Musso opened this issue · 6 comments

Hi
I get the following error trying to compile the template:

Failed to compile.

Cannot read property 'tapAsync' of undefined

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-graphics@0.1.0 build: caspar-graphics build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-graphics@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

ronag commented

Please provide a complete repro.

Hi
I'm not a developer and the example looks so simple

I just followed the example doing any change
image

the preview works fine
but when I try to compile I get that error message

ronag commented

Maybe you could just zip your project and send it?

I have the same error,
on both Windows and Linux Client

Windows:
2 info using npm@6.14.6 3 info using node@v12.18.3

Linux (Ubuntu 18.04)
2 info using npm@6.14.6 3 info using node@v12.18.3
Error Log (linux, partial)
10 silly lifecycle hello3@0.1.0~build: Args: [ '-c', 'caspar-graphics build' ] 11 silly lifecycle hello3@0.1.0~build: Returned: code: 1 signal: null 12 info lifecycle hello3@0.1.0~build: Failed to exec build script 13 verbose stack Error: hello3@0.1.0 build: caspar-graphics build13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:315:20) 13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:315:20) 13 verbose stack at maybeClose (internal/child_process.js:1021:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) 14 verbose pkgid hello3@0.1.0 15 verbose cwd /home/user/Documents/programming/vscode/hello3 16 verbose Linux 5.4.0-42-generic

That's probably related to a webpack change done earlier.

Based on your example you could try this:

  1. Make sure you use the latest create-caspar-graphics
  2. In your my-graphics/package.json, replace
"devDependencies": {
    "caspar-graphics": "^1.0.0-alpha.5",
    "husky": "^4.2.5",
    "lint-staged": "^10.2.11",
    "prettier": "^2.0.5"
  }

with

  "devDependencies": {
    "caspar-graphics": "^1.0.0-next.2",
    "husky": "^4.3.8",
    "lint-staged": "^10.5.3",
    "prettier": "^2.2.1"
  }
  1. delete node_modules
  2. run yarn
  3. run yarn build
  4. Confirm that it builds successfully.