SyntaxError: non-default argument follows default argument

Let me clarify two points here : Firstly non-default argument should not follow the default argument, it means you can’t define (a = ‘b’,c) in function. The correct order of defining parameter in function are : positional parameter or non-default parameter i.e (a,b,c) keyword parameter or default parameter i.e (a = ‘b’,r= ‘j’) keyword-only parameter i.e (*args) var-keyword parameter i.e (**kwargs) … Read more

Error after upgrading pip: cannot import name ‘main’

You must have inadvertently upgraded your system pip (probably through something like sudo pip install pip –upgrade) pip 10.x adjusts where its internals are situated. The pip3 command you’re seeing is one provided by your package maintainer (presumably debian based here?) and is not a file managed by pip. You can read more about this on pip’s issue tracker … Read more

You don’t have write permissions for the /Library/Ruby/Gems/2.3.0 directory. (mac user)

below is what I need to do. To run the specs, you’ll need to install RSpec. First, run gem install bundler in the root directory of your project. Then, run bundle install. To run a single spec file, run a command like this: bundle exec rspec spec/00_hello_spec.rb. To run all of the specs at once, run bundle exec rspec. So, … Read more

Bash script and /bin/bash^M: bad interpreter: No such file or directory

I have seen this issue when creating scripts in Windows env and then porting over to run on a Unix environment. Try running dos2unix on the script: http://dos2unix.sourceforge.net/ Or just rewrite the script in your Unix env using vi and test. Unix uses different line endings so can’t read the file you created on Windows. Hence it is seeing … Read more

Could not find a declaration file for module ‘module-name’. ‘/path/to/module-name.js’ implicitly has an ‘any’ type

That feeling when you are looking out for two days and find it like this: just remove .js from “main”: “dist/index.js” in package.json and everything works fine! UPD: this answer relative if you have your own npm package, if not – see my answer below. And if above answer not resolved import your module, try just add typings in package.json: Of course, here folder dist – it’s … Read more

fatal: The current branch master has no upstream branch

You fixed the push, but, independently of that push issue (which I explained in “Why do I need to explicitly push a new branch?“: git push -u origin master or git push -u origin –all), you need now to resolve the authentication issue. That depends on your url (ssh as in ‘[email protected]/yourRepo, or https as in https://github.com/You/YourRepo) For https … Read more