pnpm

pnpm action --filter *

Node.js 向けパッケージマネージャ兼ワークスペース管理ツール pnpm を箇条書きで解説

これからはyarn Workspacesの代わりに pnpm 使う

2022-03-01
GitHub Package Registry の認証を通して yarn install する | 35D BLOG

  1. .yarnrcGitHub package registry 書く方法
  2. pnpm pack で依存パッケージを tgz

tgzにしているのにエラーが出る. なぜ

Error: Error parsing triggers: Cannot find module '@wakame-tech/socia-core/lib/domain/service/Constant'
Require stack:
- D:\dev\hobby\automatik\functions\lib\index.js
- C:\Users\nf4k-\AppData\Roaming\npm\pnpm-global\5\node_modules\.pnpm\firebase-tools@10.2.1\node_modules\firebase-tools\
lib\deploy\functions\runtimes\node\triggerParser.js

Try running "npm install" in your functions directory before deploying.

Having trouble? Try firebase [command] --help
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

vite で, esumd 向けにビルドしてルートからimportしたらエラー出なかった.

複数のモジュール形式(CommonJS, ES Modules, UMD)をサポートしたnpmパッケージの作り方 in TypeScript - dackdive’s blog

  • CommonJS: module.exports, require()
  • with bundler ES Modules: export, import
  • with no bundler UMD

pnpm でmonorepoなディレクトリ下で pnpm install すると, monorepo全体でinstallされるが, workspace.yaml に書いていないパッケージの下で pnpm install するとmonorepoの pnpm install が優先されてしまい, そこでの pnpm install が出来ない.
work around: /.npmrc

recursive-install=false

を設定

Github Actionsから、PrivateなGithub packagesのnpm repositoryにアクセスする方法 - Qiita