記事

LIFFがCLIでlocalで開発できるらしい?

#tech
LIFFがこれまではngrokを使わないとlocalのデバッグができなかったけど、それがいい感じにCLIコマンドを叩くだけでやってくれるらしい

  • MapMemoで試してみる

liff-cliが初めての人

アクセストークンをセットしろって言われる

file:///Users/kinjyoshotaro/dev/dev-private/map-memo/node_modules/.pnpm/@[email protected]/node_modules/@line/liff-cli/dist/serve/serveAction.js:22
throw new Error(`Access token not found.
^
Error: Access token not found.
Please set the current channel first.

at serveAction (file:///Users/kinjyoshotaro/dev/dev-private/map-memo/node_modules/.pnpm/@[email protected]/node_modules/@line/liff-cli/dist/serve/serveAction.js:22:15)
at async Command.<anonymous> (file:///Users/kinjyoshotaro/dev/dev-private/map-memo/node_modules/.pnpm/@[email protected]/node_modules/@line/liff-cli/dist/serve/commands/index.js:18:9)
Node.js v20.11.0

解決方法
3. liff channel add または liff channel use コマンドでチャネルを指定していない

kinjyoshotaro@kinjoushoutarounoMacBook-Pro-2 map-memo %

$ npx liff-cli channel use {ChannlId}

Channel 2005710452 is now selected.

node-ptyをインストールしろって言われる

file:///Users/kinjyoshotaro/dev/dev-private/map-memo/node_modules/.pnpm/@[email protected]/node_modules/@line/liff-cli/dist/serve/proxy/ngrok-v1-proxy.js:14
throw new Error(Failed to import 'node-pty'. Please install it manually.);
^
Error: Failed to import 'node-pty'. Please install it manually.

$ pnpm add node-pty

ngrokのURLをoutputできなかったって言われる

file:///Users/kinjyoshotaro/dev/dev-private/map-memo/node_modules/.pnpm/@[email protected][email protected]/node_modules/@line/liff-cli/dist/serve/proxy/ngrok-v1-proxy.js:46
reject(new Error("Not found ngrok URL from the output."));
^
Error: Not found ngrok URL from the output.

npxをしているから?

これはOSSのバグなので、修正PRを作った

© 2026 Shotaro Kinjo