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

feat: add pnpm binary - use pnpm for bootstrapping #9

Merged
merged 9 commits into from
Jun 22, 2022
Merged

feat: add pnpm binary - use pnpm for bootstrapping #9

merged 9 commits into from
Jun 22, 2022

Conversation

aminya
Copy link
Member

@aminya aminya commented Jul 23, 2021

This adds the pnpm binary to papm. This paves the way for using pnpm instead of npm in the papm itself.
It also builds papm using the bundled pnpm.

It also updates the build and CI configurations and code.

Copy link
Member Author

@aminya aminya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keytar fails to run the prebuild-install, because we run npm rebuild instead of pnpm rebuild inside postinstall script

> keytar@7.7.0 install /home/aminya/papm/node_modules/keytar
> prebuild-install || npm run build

internal/modules/cjs/loader.js:968
  throw err;
  ^

Error: Cannot find module '/home/aminya/[email protected]/node_modules/prebuild-install/bin.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
    at Function.Module._load (internal/modules/cjs/loader.js:841:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

> keytar@7.7.0 build /home/aminya/papm/node_modules/.pnpm/keytar@7.7.0/node_modules/keytar
> node-gyp rebuild

Package libsecret-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libsecret-1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libsecret-1' found
gyp: Call to 'pkg-config --cflags libsecret-1' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/home/aminya/papm/node_modules/.pnpm/[email protected]/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 5.10.43.3-microsoft-standard-WSL2
gyp ERR! command "/home/aminya/papm/bin/node" "/home/aminya/papm/node_modules/.pnpm/[email protected]/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/aminya/papm/node_modules/.pnpm/[email protected]/node_modules/keytar
gyp ERR! node -v v12.18.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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/aminya/.npm/_logs/2021-07-23T01_29_24_373Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `prebuild-install || npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the keytar@7.7.0 install 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/aminya/.npm/_logs/2021-07-23T01_29_24_394Z-debug.log

@aminya aminya marked this pull request as ready for review July 23, 2021 01:53
@aminya aminya added the enhancement New feature or request label Jul 23, 2021
@aminya aminya changed the title chore: use pnpm for bootstrapping feat: add pnpm binary - use pnpm for bootstrapping Jul 23, 2021
Copy link
Member Author

@aminya aminya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the pnpm binary, which fixes the npm rebuild issue by using pnpm rebuild instead.

@aminya
Copy link
Member Author

aminya commented Jul 23, 2021

There is a loop here because of running postinstall script

@aminya aminya marked this pull request as draft July 23, 2021 05:05
@aminya aminya force-pushed the pnpm branch 2 times, most recently from d260adb to 0b4bd26 Compare July 23, 2021 06:28
@aminya
Copy link
Member Author

aminya commented Jul 23, 2021

This now works perfectly under macos and linux. I need to fix Windows now.

@aminya aminya marked this pull request as ready for review June 22, 2022 01:48
- This might fix x86 arch
- It is more reproducible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant