cli: `netlify lm:setup` crashes
- Do you want to request a feature or report a bug? Bug
- What is the current behavior?
netlify lm:setup crashes.
- If the current behavior is a bug, please provide the steps to reproduce. I ran the following commands in order:
apt-get install git-lfsgit lfs versionnetlify plugins:install netlify-lm-pluginnetlify lm:installnetlify lm:setup
All commands worked except the last one which shows:
Logging into your Netlify account...
Opening https://app.netlify.com/authorize?response_type=ticket&ticket=xxxxxx
---------------------------
Error: Unable to open browser automatically
spawn /home/ether/.local/share/netlify-cli/node_modules/netlify-lm-plugin/node_modules/@netlify/cli-utils/node_modules/cli-ux/lib/xdg-open ENOENT
Please open your browser & open the URL below to login:
https://app.netlify.com/authorize?response_type=ticket&ticket=xxxxxx
---------------------------
TypeError: Cannot read property 'slug' of undefined
at LmSetup.authenticate (~/.local/share/netlify-cli/node_modules/netlify-lm-plugin/node_modules/@netlify/cli-utils/src/index.js:116:21)
at async LmSetup.run (~/.local/share/netlify-cli/node_modules/netlify-lm-plugin/lib/commands/lm/setup.js:24:29)
at async LmSetup._run (~/.local/share/netlify-cli/node_modules/netlify-lm-plugin/node_modules/@netlify/cli-utils/node_modules/@oclif/command/lib/command.js:34:20)
at async Config.runCommand (~/.nvm/versions/node/v12.10.0/lib/node_modules/netlify-cli/node_modules/@oclif/config/lib/config.js:151:9)
at async Main.run (~/.nvm/versions/node/v12.10.0/lib/node_modules/netlify-cli/node_modules/@oclif/command/lib/main.js:21:9)
at async Main._run (~/.nvm/versions/node/v12.10.0/lib/node_modules/netlify-cli/node_modules/@oclif/command/lib/command.js:44:20)
- What is the expected behavior?
netlify lm:setup should not crash
- Local Environment Information
Paste the results of netlify status --verbose here
──────────────────────┐
Current Netlify User │
──────────────────────┘
Name: ehmicky
Email: [edited]
Teams:
ehmicky's team: Owner Collaborator Controller
────────────────────┐
Environment Info │
────────────────────┘
System:
OS: Linux 5.0 Ubuntu 19.04 (Disco Dingo)
CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
Binaries:
Node: 12.10.0 - ~/.nvm/versions/node/v12.10.0/bin/node
npm: 6.11.3 - ~/.nvm/versions/node/v12.10.0/bin/npm
Browsers:
Chrome: 76.0.3809.132
Firefox: 69.0
────────────────────┐
Netlify Site Info │
────────────────────┘
Current site: [edited]
Netlify TOML: /home/ether/code/cv-website/netlify.toml
Admin URL: https://app.netlify.com/sites/[edited]
Site URL: [edited]
Site Id: 418b94bc-93cd-411a-937a-ae4c734f17c4
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 10
- Comments: 20 (8 by maintainers)
Hi all 👋 and sorry for the delay in fixing this. CLI version
3.8.0address this issue. Please comment if you’re still experiencing issues after running:Hey everyone
Found a workaround that worked for me on Mac.
NETLIFY_AUTH_TOKENas and environment variable to terminalyarn add @netlify/cli-utils@latestin~/.local/share/netlify-clinetlify lm:setupand it FINALLY worked.I suspect for me is because I am behind some versions on npm maybe since running
npm i -g netlify-cli@latestresulted in some npm warnings.Hope it helps some of you.
Hey @overlordofmu, could you expand on this? Setting this env var does not make any difference for me:
Is this what I should be doing, or is the workaround different somehow?
It is only a workaround but it does get some people “working” again while a fix in the CLI tool is being developed.
We’ve been able to reproduce the issue and we’re working on a fix as we speak. We’ll update this issue as soon as it’s fixed.
Thanks for your patience and for the detailed information! 🙌🏻
I’m seeing exactly the same problem on Ubuntu 20.04.