question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Installing serverless 1.17.0 produces an error when installing autocompletion on Git Bash on Windows

See original GitHub issue

This is a (Bug Report / Feature Proposal)

Description

For bug reports:

  • What went wrong? Installing Serverless 1.17.0 via npm install serverless -g I get an error saying that the autocomplete scripts could not be installed.

  • What did you expect should have happened? Serverless install would complete without error and autocompletion package would work.

  • What was the config you used? npm install serverless -g on Windows 10 using the “Git Bash” application that is included with an installation of Git.

  • What stacktrace or error message from your provider did you see?

fs.js:641
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open 'C:\Users\<user>\AppData\Roaming\npm\node_modules\
serverless\node_modules\tabtab\scripts\C:\Program Files\Git\usr\bin\bash.sh'
    at Error (native)
    at Object.fs.openSync (fs.js:641:18)
    at fs.readFileSync (fs.js:509:33)
    at Complete.script (C:\Users\<user>\AppData\Roaming\npm\node_modules\serverless\node_modules\
tabtab\src\complete.js:373:14)
    at Installer.writeTo (C:\Users\<user>\AppData\Roaming\npm\node_modules\serverless\node_module
s\tabtab\src\installer.js:91:34)
    at Installer.handle (C:\Users\<user>\AppData\Roaming\npm\node_modules\serverless\node_modules
\tabtab\src\installer.js:80:21)
    at Commands.install (C:\Users\<user>\AppData\Roaming\npm\node_modules\serverless\node_modules
\tabtab\src\commands\index.js:75:22)
    at Object.<anonymous> (C:\Users\<user>\AppData\Roaming\npm\node_modules\serverless\node_modul
es\tabtab\src\cli.js:33:16)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
Could not auto-install serverless autocomplete script.
Please copy / paste the script above into your shell.

This looks like an error inside of the tabtab package. I will report it there, but since this produces an error in the Serverless install I thought you’d want to know also.

Looking at the source of tabtab\src\complete.js at line 373 it is using a variable to try to find the right .sh file to load. It is trying to parse this out of the shell information but on Windows in Git Bash it is staying the full path to bash.

For feature proposals:

  • What is the use case that should be solved. The more detail you describe this in the easier it is to understand for us.
  • If there is additional config how would it look

Similar or dependent issues: https://github.com/mklabs/node-tabtab/issues/36

Additional Data

  • Serverless Framework Version you’re using: 1.17.0
  • Operating System: Windows 10 (64 bit)
  • Stack Trace: (Shown above)
  • Provider Error messages:

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
LosDcommented, Sep 27, 2017

I had the same issue (also in Git Bash on Win 10). A workaround is to manually run tabtab install --name serverless, and choose “Bash config file (~/.bashrc)”… It seems to be an issue with --auto and the Windows path replacements done by Git Bash.

2reactions
cornfeedhobocommented, Apr 6, 2018

Serverless just shouldn’t be messing with tab completion at all unless a user requests it. This breaks so many expectations.

Please refer to #4069 for more.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows is not recognizing serverless as internal or external ...
I was able to install serverless with the normal account just fine, but then the serverless command was not found (even after closing...
Read more >
serverless | Yarn - Package Manager
Serverless Framework - Build web, mobile and IoT applications with serverless architectures using AWS Lambda, Azure Functions, Google CloudFunctions & more.
Read more >
serverless - UNPKG
- Locally installed (in service `node_modules`) CLI will be run instead of global one, when globally installed `serverless` CLI is invoked in a...
Read more >
npm install timeout error | The AI Search Engine You Control
I have run npm doctor off VPN and resolved any suggestions it made. When running on VPN npm doctor hangs until the following...
Read more >
Release Notes | Google Cloud CLI Documentation
(Cloud Run) In gcloud run deploy and gcloud run services update , --set-secrets , --remove-secrets , and --update-secrets flags now support mounting ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found