Error while install new bench

i am installing erpnext11 on new bench
but it gives me that error while installing

yarn run v1.10.1 error Couldn't find a package.json file in "/home/alsum/newbench/env/lib/python2.7/site-packages/frappe-10.1.48-py2.7.egg" info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

If you updated from older bench/frappe/erpnext by switching to staging branch then this can be easily fixed.

su - frappe -s /bin/bash 
# change frappe to your username used while installing bench
cd ~/frappe-bench/apps/frappe/
git clean -df
git reset --hard
git fetch
git checkout staging # switching to Frappe V11 Beta release branch
# then same steps for erpnext
cd ~/frappe-bench/apps/erpnext/
git clean -df
git reset --hard
git fetch
git checkout staging # switching to ERPNext V11 Beta release branch
# Then perform Update
cd ~/frappe-bench/
bench update --requirements
bench update --patch

If you have existing customizations or files, make sure you do have backup.