Skip to content

Cannot initialize project: npm install fails to install private dep and there's a build error #238

@alejandroiglesias

Description

@alejandroiglesias

I'm trying to fix a recent issue that gets fixed by bumping the @airbnb/lottie-web dependency and making a pull request, but the project cannot be initialized since npm install fails to install @lottiefiles/eslint-plugin with a 401 err. Actually, I had to run npm i --legacy-peer-deps since otherwise there's a peer dependency conflict. After running npm i --legacy-peer-deps I get:

npm ERR! code E401
npm ERR! 401 Unauthorized - GET https://npm.pkg.github.com/download/@lottiefiles/eslint-plugin/2.2.0/6d8d8bdd1da320795bbe9c57d06b0d8c455f264e87a1fb7b851658a86c36291f - authentication token not provided

If I remove the @lottiefiles/eslint-plugin dependency, I still get an error with the npm install:

npm ERR! code 1
npm ERR! path /Users/alejandrogarciaiglesias/Development/rotundasoftware/lottie-player/node_modules/deasync
npm ERR! command failed
npm ERR! command sh -c node ./build.js
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@5.1.1
npm ERR! gyp info using node@18.19.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.11.6 found at "/opt/homebrew/opt/python@3.11/bin/python3.11"
npm ERR! (node:31300) [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.11/bin/python3.11
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/alejandrogarciaiglesias/Development/rotundasoftware/lottie-player/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/alejandrogarciaiglesias/Development/rotundasoftware/lottie-player/node_modules/deasync/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/alejandrogarciaiglesias/Development/rotundasoftware/lottie-player/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/alejandrogarciaiglesias/Library/Caches/node-gyp/18.19.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/alejandrogarciaiglesias/Library/Caches/node-gyp/18.19.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/alejandrogarciaiglesias/Development/rotundasoftware/lottie-player/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/alejandrogarciaiglesias/Library/Caches/node-gyp/18.19.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/alejandrogarciaiglesias/Development/rotundasoftware/lottie-player/node_modules/deasync',
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! Traceback (most recent call last):
npm ERR!   File "/Users/alejandrogarciaiglesias/Development/rotundasoftware/lottie-player/node_modules/node-gyp/gyp/gyp_main.py", line 50, in <module>
npm ERR!     sys.exit(gyp.script_main())
npm ERR!              ^^^^^^^^^^^^^^^^^
npm ERR!   File "/Users/alejandrogarciaiglesias/Development/rotundasoftware/lottie-player/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 554, in script_main
npm ERR!     return main(sys.argv[1:])
npm ERR!            ^^^^^^^^^^^^^^^^^^
npm ERR!   File "/Users/alejandrogarciaiglesias/Development/rotundasoftware/lottie-player/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 547, in main
npm ERR!     return gyp_main(args)
npm ERR!            ^^^^^^^^^^^^^^
npm ERR!   File "/Users/alejandrogarciaiglesias/Development/rotundasoftware/lottie-player/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 520, in gyp_main
npm ERR!     [generator, flat_list, targets, data] = Load(
npm ERR!                                             ^^^^^
npm ERR!   File "/Users/alejandrogarciaiglesias/Development/rotundasoftware/lottie-player/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 136, in Load
npm ERR!     result = gyp.input.Load(build_files, default_variables, includes[:],
npm ERR!              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR!   File "/Users/alejandrogarciaiglesias/Development/rotundasoftware/lottie-player/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2782, in Load
npm ERR!     LoadTargetBuildFile(build_file, data, aux_data,
npm ERR!   File "/Users/alejandrogarciaiglesias/Development/rotundasoftware/lottie-player/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 391, in LoadTargetBuildFile
npm ERR!     build_file_data = LoadOneBuildFile(build_file_path, data, aux_data,
npm ERR!                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR!   File "/Users/alejandrogarciaiglesias/Development/rotundasoftware/lottie-player/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 234, in LoadOneBuildFile
npm ERR!     build_file_contents = open(build_file_path, 'rU').read()
npm ERR!                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR! ValueError: invalid mode: 'rU' while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/Users/alejandrogarciaiglesias/Development/rotundasoftware/lottie-player/node_modules/node-gyp/lib/configure.js:351:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:517:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:292:12)
npm ERR! gyp ERR! System Darwin 23.2.0
npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node@18/18.19.0/bin/node" "/Users/alejandrogarciaiglesias/Development/rotundasoftware/lottie-player/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Users/alejandrogarciaiglesias/Development/rotundasoftware/lottie-player/node_modules/deasync
npm ERR! gyp ERR! node -v v18.19.0
npm ERR! gyp ERR! node-gyp -v v5.1.1
npm ERR! gyp ERR! not ok
npm ERR! Build failed

npm ERR! A complete log of this run can be found in: /Users/alejandrogarciaiglesias/.npm/_logs/2024-02-01T20_41_16_077Z-debug-0.log

Can you please help me figure this out? Our code is relying on Lottie animations and we use lottie-player, but the animations are broken until the @airbnb/lottie-web dependency is updated to the latest (already tested the lottie-web player standalone and it works fine, but it would require a big refactor for us).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions