vime-js / vime

Customizable, extensible, accessible and framework agnostic media player. Modern alternative to Video.js and Plyr. Supports HTML5, HLS, Dash, YouTube, Vimeo, Dailymotion...
https://vimejs.com
MIT License
2.78k stars 152 forks source link

bug: Cannot install vime #233

Closed seenickcode closed 3 years ago

seenickcode commented 3 years ago

Bug Report

Vime version:

5.0.33

Provider:

n/a

Current behavior:

❯ npm i vime
npm ERR! code 1
npm ERR! path /Users/seenickcode/code/fcc-v2/node_modules/vime
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! CXX(target) Release/obj.target/binding/binding.o
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@16.5.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.6 found at "/opt/homebrew/opt/python@3.9/bin/python3.9"
npm ERR! (node:7719) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /opt/homebrew/opt/python@3.9/bin/python3.9
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/seenickcode/.nvm/versions/node/v16.5.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/seenickcode/code/fcc-v2/node_modules/vime/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/seenickcode/.nvm/versions/node/v16.5.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/seenickcode/Library/Caches/node-gyp/16.5.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/seenickcode/Library/Caches/node-gyp/16.5.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/seenickcode/.nvm/versions/node/v16.5.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/seenickcode/Library/Caches/node-gyp/16.5.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/seenickcode/code/fcc-v2/node_modules/vime',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! ../binding.cc:35:48: warning: 'CreationContext' is deprecated: Use MaybeLocal<Context> GetCreationContext() [-Wdeprecated-declarations]
npm ERR!     new_context = second_arg.As<v8::Object>()->CreationContext();
npm ERR!                                                ^
npm ERR! /Users/seenickcode/Library/Caches/node-gyp/16.5.0/include/node/v8.h:4299:3: note: 'CreationContext' has been explicitly marked deprecated here
npm ERR!   V8_DEPRECATE_SOON("Use MaybeLocal<Context> GetCreationContext()")
npm ERR!   ^
npm ERR! /Users/seenickcode/Library/Caches/node-gyp/16.5.0/include/node/v8config.h:423:39: note: expanded from macro 'V8_DEPRECATE_SOON'
npm ERR! # define V8_DEPRECATE_SOON(message) [[deprecated(message)]]
npm ERR!                                       ^
npm ERR! ../binding.cc:51:12: error: no matching member function for call to 'Set'
npm ERR!   binding->Set(context, v8::String::NewFromUtf8(isolate, "execute"),
npm ERR!   ~~~~~~~~~^~~
npm ERR! /Users/seenickcode/Library/Caches/node-gyp/16.5.0/include/node/v8.h:3945:37: note: candidate function not viable: no known conversion from 'MaybeLocal<v8::String>' to 'Local<v8::Value>' for 2nd argument
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!                                     ^
npm ERR! /Users/seenickcode/Library/Caches/node-gyp/16.5.0/include/node/v8.h:3948:37: note: candidate function not viable: no known conversion from 'MaybeLocal<v8::String>' to 'uint32_t' (aka 'unsigned int') for 2nd argument
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!                                     ^
npm ERR! 1 warning and 1 error generated.
npm ERR! make: *** [Release/obj.target/binding/binding.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/Users/seenickcode/.nvm/versions/node/v16.5.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 20.5.0
npm ERR! gyp ERR! command "/Users/seenickcode/.nvm/versions/node/v16.5.0/bin/node" "/Users/seenickcode/.nvm/versions/node/v16.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/seenickcode/code/fcc-v2/node_modules/vime
npm ERR! gyp ERR! node -v v16.5.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/seenickcode/.npm/_logs/2021-08-02T11_40_41_506Z-debug.log

Expected behavior:

One can install vime via npm

Steps to reproduce:

npm i vime

Related code:

n/a

Other information:

❯ npm -v
7.19.1
➜ node -v
v16.5.0
➜ sw_vers
ProductName:    macOS
ProductVersion: 11.4
BuildVersion:   20F71

Update 1: the issue exists even after still successfully following node-gyp's "acid test" cited here https://github.com/nodejs/node-gyp/blob/master/macOS_Catalina.md#Solutions

AntonOfTheWoods commented 3 years ago

@seenickcode , https://www.npmjs.com/package/vime ? Not sure there is much of a relation with this package...

mihar-22 commented 3 years ago

Ye installed wrong project, try npm i @vime/core instead.

seenickcode commented 3 years ago

@AntonOfTheWoods so I mentioned the wrong URL there, yeah.

npm i @vime/core worked, thanks @mihar-22

Ok so js/npm newbie question, how should I have determined what npm command to use in order to install this package? I looked at package.json and I see vime as the package name. How does one know to use @vime/core because I do not see any install instructions in the README.

mihar-22 commented 3 years ago

No problem @seenickcode. Few things you can do:

  1. First check README.md.
  2. If not there you can head over the website and follow documentation. A link is usually available in the About section in the sidebar on the right as soon as you land on the repository. Otherwise there might be a link in the README.md to the documentation and you can look for a Install section.
  3. If no website you can check the package.json and look for the name field. Some libraries on GitHub are organised as a monorepo such as Vime. A monorepo is really just a way to manage multiple NPM packages in one place. If you see a lerna.config.js or private: true in the package.json then this should probably indiciate that it's a monorepo. You'll need to explore the packages/ directory to see public NPM packages are actually available. Keep in mind to always check private field in package.json.

Generally it should be listed in README.md or on the website so you shouldn't need to use your explorer hat.

Screen Shot 2021-08-06 at 3 23 30 pm


Screen Shot 2021-08-06 at 3 28 12 pm


Screen Shot 2021-08-06 at 3 28 47 pm


Screen Shot 2021-08-06 at 3 31 46 pm

seenickcode commented 3 years ago

Thank you very much for the detailed write up! @mihar-22