independent full stack developer

/ Developer's blog

How to fix Nodemon Command not found on Ubuntu 16

Friday, March 29, 2024

Hey, I suppose that you already googled and try some answers on SO about that. I have a good solution how to fix the error with nodemon, when you do npm install -g and then nodemon server.js and see: Command not found.

I solved it with the next:

sudo npm install nodemon -g
sudo ln -s /usr/local/lib/node_modules/nodemon/bin/nodemon.js /usr/local/bin/nodemon

That's it, with this command we install nodemon, and then create a symbolic link. It works like a charm.

read more Like the other 15277 people already did

What if "Cannot find module cross-env" for npm run dev with Laravel 5.5 and Vuejs

Friday, March 29, 2024

Hey, I feel anyone can experience such bug with fresh install Ubuntu 16.04 and Laravel 5.5 for your local environment.

So, if you're stumbled with such errors like when you try to use npm run dev

Cannot find module cross-env
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode 
Make sure you have the latest version of node.js and npm installed

Very often it means that you have an old version of your nodejs, so when you install it as apt-get install nodejs, you will install and old LTS version 4.2.6 that too old. To fix it, you just need to update your Nodejs and everything will work seamlessly. How to do it? Follow the next steps.

read more Like the other 2912 people already did

What if npm can't find the node /usr/bin/env: ‘node’: No such file or directory

Friday, March 29, 2024

Fixed! There is a popular issue when you try to make bower install and get the error about /usr/bin/env: "node": No such fileor directory. It's easy to fix.

for example, you get something like that

root@space:/var/www/space/public# bower install
/usr/bin/env: ‘node’: No such file or directory

To fix it, just make a symbolic link for your node-js in /usr/bin folder, and that's it!

root@space:/usr/bin# node
node-gyp  nodejs    
root@space:/usr/bin# ln -s nodejs node

read more Like the other 9619 people already did

Laravel 5.4 markdown email doesn't render HTML

Friday, March 29, 2024

If you ever stumbled with question why your markdown email in Laravel doesn't render properly, you have to know - that you need to remove any tabs/spaces before lines, so if you like to press CTRL+ALT+L and format your template pretty, be aware that it will broke your mail template :)

read more Like the other 3718 people already did

New Bootstrap release is coming! Pre-release was published.

Friday, March 29, 2024
read more Like the other 2046 people already did

HotFix: Laravel - Failed to open stream: Permission denied

Friday, March 29, 2024

#laravel #error

Sometimes it happens :) if you stumbled with error about file_get_content and permission denied - failed to open the stream in Laravel 5, try these commands, and everything should be fixed. Try this code if the error occurs on the localhost and dev server.

php artisan cache:clear
chmod -R 777 storage/
composer dump-autoload

read more Like the other 30741 people already did

How to fix Undefined variable: access_token Laravel - FacebookProvider

Friday, March 29, 2024

Today when I try to sign in via Facebook to my Laravel project, I got an error 

Undefined variable: access_token vendor/laravel/socialite/src/Two/FacebookProvider.php

If you use fersion ~1.0

To make it work normally with hotfix, open vendor/laravel/socialite/src/Two/FacebookProvider.php and replace

read more Like the other 7716 people already did

How to fix JavaScript and JSON error in Sublime with CodeFormatter package

Friday, March 29, 2024

For the last several months I try to migrate from PHPStorm to Sublime or Atom code editors. The reasons for my decision deserve a separate story, and I will write about it little soon. But now, I want to share how to fix a bug message when you try to format javascript or JSON code in Sublime Text 3 wit CodeFormatter package.So, if you got the message

CodeDormatter

Formatter for this file type (json (javascriptnext)) not found

Let's got to settings, and push some changes.

read more Like the other 2885 people already did