moviemasher / moviemasher.js

JavaScript library for realtime, browser-based video and audio editing
Mozilla Public License 2.0
304 stars 63 forks source link

`npm run build` returns ERROR: Task not found: "@moviemasher/moviemasher.js" on Ubuntu 20.04 VM #34

Closed ccammack closed 2 years ago

ccammack commented 2 years ago

The npm run build command fails for me when following the instructions in Development. I'm sure I'm missing something obvious, but what?

ccammack@rails:~/work$ uname -a
Linux rails 5.13.0-44-generic #49~20.04.1-Ubuntu SMP Wed May 18 18:44:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

ccammack@rails:~/work/mm$ npm -v
6.14.4

ccammack@rails:~/work/mm$ node -v
v10.19.0

ccammack@rails:~/work$ git clone https://github.com/moviemasher/moviemasher.js.git mm
Cloning into 'mm'...
remote: Enumerating objects: 16655, done.
remote: Counting objects: 100% (2797/2797), done.
remote: Compressing objects: 100% (1375/1375), done.
remote: Total 16655 (delta 2071), reused 1842 (delta 1409), pack-reused 13858
Receiving objects: 100% (16655/16655), 35.62 MiB | 9.52 MiB/s, done.
Resolving deltas: 100% (12053/12053), done.

ccammack@rails:~/work$ cd mm

ccammack@rails:~/work/mm$ npm install
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
npm WARN deprecated node-pre-gyp@0.13.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future

> canvas@2.9.1 install /home/ccammack/work/mm/node_modules/canvas
> node-pre-gyp install --fallback-to-build

[canvas] Success: "/home/ccammack/work/mm/node_modules/canvas/build/Release/canvas.node" is installed via remote
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 530 packages from 551 contributors and audited 533 packages in 21.794s

66 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

ccammack@rails:~/work/mm$ npm run build

> @moviemasher/moviemasher-core@5.0.6 build /home/ccammack/work/mm
> run-s build-core build-client build-server build-example build-example-react

> @moviemasher/moviemasher-core@5.0.6 build-core /home/ccammack/work/mm
> npm run build -w @moviemasher/moviemasher.js

> @moviemasher/moviemasher-core@5.0.6 build /home/ccammack/work/mm
> run-s build-core build-client build-server build-example build-example-react "@moviemasher/moviemasher.js"

ERROR: Task not found: "@moviemasher/moviemasher.js"
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @moviemasher/moviemasher-core@5.0.6 build: `run-s build-core build-client build-server build-example build-example-react "@moviemasher/moviemasher.js"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @moviemasher/moviemasher-core@5.0.6 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ccammack/.npm/_logs/2022-05-26T15_23_16_924Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @moviemasher/moviemasher-core@5.0.6 build-core: `npm run build -w @moviemasher/moviemasher.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @moviemasher/moviemasher-core@5.0.6 build-core script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ccammack/.npm/_logs/2022-05-26T15_23_16_976Z-debug.log
ERROR: "build-core" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @moviemasher/moviemasher-core@5.0.6 build: `run-s build-core build-client build-server build-example build-example-react`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @moviemasher/moviemasher-core@5.0.6 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ccammack/.npm/_logs/2022-05-26T15_23_17_030Z-debug.log

ccammack@rails:~/work/mm$ cat /home/ccammack/.npm/_logs/2022-05-26T15_23_16_924Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli   '/usr/bin/npm',
1 verbose cli   'run',
1 verbose cli   'build',
1 verbose cli   '-w',
1 verbose cli   '@moviemasher/moviemasher.js' ]
2 info using npm@6.14.4
3 info using node@v10.19.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle @moviemasher/moviemasher-core@5.0.6~prebuild: @moviemasher/moviemasher-core@5.0.6
6 info lifecycle @moviemasher/moviemasher-core@5.0.6~build: @moviemasher/moviemasher-core@5.0.6
7 verbose lifecycle @moviemasher/moviemasher-core@5.0.6~build: unsafe-perm in lifecycle true
8 verbose lifecycle @moviemasher/moviemasher-core@5.0.6~build: PATH: /usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ccammack/work/mm/node_modules/.bin:/usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ccammack/work/mm/node_modules/.bin:/usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ccammack/work/mm/node_modules/.bin:/home/ccammack/.rvm/gems/ruby-3.0.0/bin:/home/ccammack/.rvm/gems/ruby-3.0.0@global/bin:/home/ccammack/.rvm/rubies/ruby-3.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ccammack/.rvm/bin:/home/ccammack/.rvm/bin
9 verbose lifecycle @moviemasher/moviemasher-core@5.0.6~build: CWD: /home/ccammack/work/mm
10 silly lifecycle @moviemasher/moviemasher-core@5.0.6~build: Args: [ '-c',
10 silly lifecycle   'run-s build-core build-client build-server build-example build-example-react "@moviemasher/moviemasher.js"' ]
11 silly lifecycle @moviemasher/moviemasher-core@5.0.6~build: Returned: code: 1  signal: null
12 info lifecycle @moviemasher/moviemasher-core@5.0.6~build: Failed to exec build script
13 verbose stack Error: @moviemasher/moviemasher-core@5.0.6 build: `run-s build-core build-client build-server build-example build-example-react "@moviemasher/moviemasher.js"`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:198:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:198:13)
13 verbose stack     at maybeClose (internal/child_process.js:982:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid @moviemasher/moviemasher-core@5.0.6
15 verbose cwd /home/ccammack/work/mm
16 verbose Linux 5.13.0-44-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "build" "-w" "@moviemasher/moviemasher.js"
18 verbose node v10.19.0
19 verbose npm  v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error @moviemasher/moviemasher-core@5.0.6 build: `run-s build-core build-client build-server build-example build-example-react "@moviemasher/moviemasher.js"`
22 error Exit status 1
23 error Failed at the @moviemasher/moviemasher-core@5.0.6 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
syntropo commented 2 years ago

Sorry to see you're having difficulty... Building seems to work using the following versions on OSX:

doug@home moviemasher.js % npm -v
8.6.0 doug@home moviemasher.js % node -v v16.14.2

From the log it looks like your npm is not correctly interpreting the -w (workspace) argument, which I think was introduced in version 7?

Another alternative might be to use the Docker image, though this hasn't been tested as extensively in the current version.

ccammack commented 2 years ago

Thank you! I also had to manually run npm update typescript, but it works now.

ccammack@rails:~/work/mm$ nvm install 16.14.2
[...]
ccammack@rails:~/work/mm$ npm -v
8.5.0
ccammack@rails:~/work/mm$ node -v
v16.14.2

ccammack@rails:~/work/mm$ npm run build
[...]
src/index.ts → dist/esm/index.js...
[!] (plugin Typescript) TS2339: Property 'add' does not exist on type 'FontFaceSet'.
src/Preloader/BrowserPreloaderClass.ts (106:26)

106           document.fonts.add(face)
                             ~~~
[...]
ERROR: "build-core" exited with 1.

ccammack@rails:~/work/mm$ npm list typescript
@moviemasher/moviemasher-core@5.0.6 /home/ccammack/work/mm
├─┬ rollup-plugin-ts@2.0.5
│ ├─┬ compatfactory@0.0.12
│ │ └── typescript@4.5.5 deduped
│ ├─┬ ts-clone-node@0.3.30
│ │ └── typescript@4.5.5 deduped
│ └── typescript@4.5.5 deduped
├─┬ ts-jest@27.1.4
│ └── typescript@4.5.5 deduped
└── typescript@4.5.5

ccammack@rails:~/work/mm$ npm update typescript
[...]

ccammack@rails:~/work/mm$ npm list typescript
@moviemasher/moviemasher-core@5.0.6 /home/ccammack/work/mm
├─┬ @moviemasher/client-react@5.0.6 -> ./packages/client-react
│ └── typescript@4.5.5 deduped
├─┬ @moviemasher/moviemasher.js@5.0.6 -> ./packages/moviemasher.js
│ └── typescript@4.5.5 deduped
├─┬ @moviemasher/server-express@5.0.6 -> ./packages/server-express
│ └── typescript@4.5.5 deduped
├─┬ rollup-plugin-ts@2.0.5
│ ├─┬ compatfactory@0.0.12
│ │ └── typescript@4.5.5 deduped
│ ├─┬ ts-clone-node@0.3.30
│ │ └── typescript@4.5.5 deduped
│ └── typescript@4.5.5 deduped
├─┬ ts-jest@27.1.4
│ └── typescript@4.5.5 deduped
└── typescript@4.5.5
syntropo commented 2 years ago

Super! Thanks for sharing your solution.