Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarn install better-sqlite3 error #5220

Closed
martineizayaga opened this issue May 3, 2021 · 5 comments
Closed

yarn install better-sqlite3 error #5220

martineizayaga opened this issue May 3, 2021 · 5 comments

Comments

@martineizayaga
Copy link

I was unable to get set up.

I ran yarn install --frozen-lockfile and I got an error.

What should I do?

These are my specs:
macOS Catalina
Version 10.15.7
MacBook Pro (16-inch, 2019)
Processor: 2.3 GHz 8-Core Intel Core i9

yarn install v1.22.10
[1/6] 🔍  Validating package.json...
[2/6] 🔍  Resolving packages...
[3/6] 🚚  Fetching packages...
[4/6] 🔗  Linking dependencies...
warning " > react-contextmenu@2.11.0" has unmet peer dependency "prop-types@^15.0.0".
warning " > react-sortable-hoc@1.9.1" has unmet peer dependency "prop-types@^15.5.7".
warning " > css-loader@3.2.0" has incorrect peer dependency "webpack@^4.0.0".
warning " > eslint-config-airbnb-typescript-prettier@3.1.0" has incorrect peer dependency "typescript@>=3.3.1 <3.10.0".
warning " > file-loader@4.2.0" has incorrect peer dependency "webpack@^4.0.0".
warning " > grunt-gitinfo@0.1.7" has incorrect peer dependency "grunt@~0.4.5".
warning " > sass-loader@7.2.0" has incorrect peer dependency "webpack@^3.0.0 || ^4.0.0".
warning " > style-loader@1.0.0" has incorrect peer dependency "webpack@^4.0.0".
[5/6] 🔨  Building fresh packages...
[9/36] ⠈ fs-xattr
[15/36] ⠈ electron-chromedriver
[16/36] ⠈ websocket
[13/36] ⠈ sharp
error /Users/martin/Documents/dev/Signal-Desktop/node_modules/better-sqlite3: Command failed.
Exit code: 1
Command: npm run build-release
Arguments: 
Directory: /Users/martin/Documents/dev/Signal-Desktop/node_modules/better-sqlite3
Output:
> better-sqlite3@7.1.4 build-release
> node-gyp rebuild --release

gyp info it worked if it ends with ok
gyp info using node-gyp@6.1.0
gyp info using node@14.16.0 | darwin | x64
gyp info find Python using Python version 3.9.2 found at "/usr/local/opt/python@3.9/bin/python3.9"
gyp info spawn /usr/local/opt/python@3.9/bin/python3.9
gyp info spawn args [
gyp info spawn args   '/Users/martin/Documents/dev/Signal-Desktop/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/martin/Documents/dev/Signal-Desktop/node_modules/better-sqlite3/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/martin/Documents/dev/Signal-Desktop/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/martin/Library/Caches/node-gyp/14.16.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/martin/Library/Caches/node-gyp/14.16.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/martin/Documents/dev/Signal-Desktop/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/martin/Library/Caches/node-gyp/14.16.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/martin/Documents/dev/Signal-Desktop/node_modules/better-sqlite3',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  TOUCH b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
  ACTION deps_sqlite3_gyp_locate_sqlite3_target_extract_sqlite3 b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
/Users/martin/Documents/dev/Signal-Desktop/node_modules/better-sqlite3/deps/extract.js:8
process.on('unhandledRejection', (err) => { throw err; });
                                            ^

Error: TAR_BAD_ARCHIVE: Unrecognized archive format
    at Unpack.warn (/Users/martin/Documents/dev/Signal-Desktop/node_modules/better-sqlite3/node_modules/tar/lib/warn-mixin.js:19:40)
    at Unpack.warn (/Users/martin/Documents/dev/Signal-Desktop/node_modules/better-sqlite3/node_modules/tar/lib/unpack.js:189:18)
    at Unpack.<anonymous> (/Users/martin/Documents/dev/Signal-Desktop/node_modules/better-sqlite3/node_modules/tar/lib/parse.js:81:14)
    at Unpack.emit (events.js:327:22)
    at Unpack.[emit] (/Users/martin/Documents/dev/Signal-Desktop/node_modules/better-sqlite3/node_modules/tar/lib/parse.js:285:12)
    at Unpack.[maybeEnd] (/Users/martin/Documents/dev/Signal-Desktop/node_modules/better-sqlite3/node_modules/tar/lib/parse.js:401:17)
    at Unpack.[consumeChunk] (/Users/martin/Documents/dev/Signal-Desktop/node_modules/better-sqlite3/node_modules/tar/lib/parse.js:432:21)
    at Unpack.write (/Users/martin/Documents/dev/Signal-Desktop/node_modules/better-sqlite3/node_modules/tar/lib/parse.js:364:25)
    at Unpack.end (/Users/martin/Documents/dev/Signal-Desktop/node_modules/better-sqlite3/node_modules/tar/lib/parse.js:477:14)
    at Yallist.<anonymous> (/Users/martin/Documents/dev/Signal-Desktop/node_modules/better-sqlite3/node_modules/minipass/index.js:396:18) {
  recoverable: false,
  file: '/Users/martin/Documents/dev/Signal-Desktop/node_modules/better-sqlite3/deps/sqlite3.tar.gz',
  cwd: '/Users/martin/Documents/dev/Signal-Desktop/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3',
  code: 'TAR_BAD_ARCHIVE',
  tarCode: 'TAR_BAD_ARCHIVE'
}
make: *** [b857c92884e9598d609f6be182a2595df7a8e00f.intermediate] Error 1
rm b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/martin/Documents/dev/Signal-Desktop/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/usr/local/bin/node" "/Users/martin/Documents/dev/Signal-Desktop/node_modules/.bin/node-gyp" "rebuild" "--release"
gyp ERR! cwd /Users/martin/Documents/dev/Signal-Desktop/node_modules/better-sqlite3
gyp ERR! node -v v14.16.0
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok 
npm ERR! code 1
npm ERR! path /Users/martin/Documents/dev/Signal-Desktop/node_modules/better-sqlite3
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild --release```
@hiqua
Copy link
Contributor

hiqua commented May 4, 2021

What should I do?

Ask on the forum.

@scottnonnenberg-signal
Copy link
Contributor

In the future, ask on the forum. For now, you need to install git-lfs and then delete your node_modules and yarn cache clean and then reinstall everything with git-lfs support.

@ryancwalsh
Copy link

Thanks, @scottnonnenberg-signal . rm -rf node_modules/ && yarn cache clean seemed to get me past this error.

(I'm now getting Module not found: Error: Can't resolve './app/attachments', but that's a separate issue that I'll investigate.)

@feniljariwala82
Copy link

feniljariwala82 commented Aug 5, 2022

In the future, ask on the forum. For now, you need to install git-lfs and then delete your node_modules and yarn cache clean and then reinstall everything with git-lfs support.

macOs Montery
Version 12.4 Beta
Mac mini (Late 2014)
Processor 2.6 GHz Dual-Core Intel Core i5
This didn't work for me.

@indutny-signal
Copy link
Contributor

@feniljariwala82 could you post your log from yarn install --frozen-lockfile, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

6 participants