Error when initializing second bench

frappe@ubuntu:~$ ls -l
total 24
drwxr-xr-x 8 frappe frappe 4096 Aug 21 10:03 frappe-bench
-rw-r–r-x 1 frappe frappe 15259 Jul 7 07:39 install.py
-rw-r–r-- 1 frappe root 64 Jul 7 07:40 passwords.txt
frappe@ubuntu:~$ bench init frappe-bench13
WARN: Command not being executed in bench directory
$ /usr/local/bin/virtualenv -q env -p python3
Already using interpreter /usr/bin/python3
$ ./env/bin/pip install -q -U -e frappe-bench13/apps/frappe
ERROR: frappe-bench13/apps/frappe is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with svn+, git+, hg+, or bzr+).
INFO:bench.app:Getting app frappe
$ git clone GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --depth 1 --origin upstream
Cloning into ‘frappe’…
remote: Enumerating objects: 2951, done.
remote: Counting objects: 100% (2951/2951), done.
remote: Compressing objects: 100% (2742/2742), done.
remote: Total 2951 (delta 397), reused 1068 (delta 140), pack-reused 0
Receiving objects: 100% (2951/2951), 12.00 MiB | 1.11 MiB/s, done.
Resolving deltas: 100% (397/397), done.
INFO:bench.app:installing frappe
$ frappe-bench13/env/bin/pip install -q -U -e frappe-bench13/apps/frappe
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

google-api-core 1.22.1 requires google-auth<2.0dev,>=1.19.1, but you’ll have google-auth 1.18.0 which is incompatible.
Updating node packages…
$ yarn install
yarn install v1.22.4
[1/4] Resolving packages…
[2/4] Fetching packages…
error mkdirp@1.0.4: The engine “node” is incompatible with this module. Expected version “>=10”. Got “8.17.0”
error Found incompatible module.
info Visit yarn install | Yarn for documentation about this command.
$ bench build
yarn run v1.22.4
$ FRAPPE_ENV=production node rollup/build.js
module.js:550
throw err;
^

Error: Cannot find module ‘chalk’
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (/home/frappe/frappe-bench13/apps/frappe/rollup/build.js:3:15)
at Module._compile (module.js:653:30)
at Object.Module._extensions…js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
error Command failed with exit code 1.
info Visit yarn run | Yarn for documentation about this command.
INFO:bench.utils:setting up backups
SUCCESS: Bench frappe-bench13 initialized

frappe@ubuntu:~$ ls -l
total 28
drwxr-xr-x 8 frappe frappe 4096 Aug 21 10:03 frappe-bench
drwxrwxr-x 7 frappe frappe 4096 Aug 27 08:35 frappe-bench13
-rw-r–r-x 1 frappe frappe 15259 Jul 7 07:39 install.py
-rw-r–r-- 1 frappe root 64 Jul 7 07:40 passwords.txt

frappe@ubuntu:~$ cd frappe-bench13
frappe@ubuntu:~/frappe-bench13$ ls -l
total 28
drwxrwxr-x 3 frappe frappe 4096 Aug 27 08:34 apps
drwxrwxr-x 3 frappe frappe 4096 Aug 27 08:35 config
drwxrwxr-x 6 frappe frappe 4096 Aug 27 08:35 env
drwxrwxr-x 2 frappe frappe 4096 Aug 27 08:34 logs
-rw-r–r-- 1 frappe frappe 194 Aug 27 08:35 patches.txt
-rw-rw-r-- 1 frappe frappe 431 Aug 27 08:35 Procfile
drwxrwxr-x 3 frappe frappe 4096 Aug 27 08:35 sites
frappe@ubuntu:~/frappe-bench13$

2 Likes

After searching, I did:

To update node and yarn:
frappe@ubuntu:~$ curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -
frappe@ubuntu:~$ sudo apt-get install -y nodejs yarn

While fixing the chalk error:
frappe@ubuntu:~/frappe-bench13$ bench setup socketio
frappe@ubuntu:~/frappe-bench13$ bench setup requirements
Updating Python libraries…
$ ./env/bin/pip install -q -U pip
INFO:bench.app:installing frappe
$ ./env/bin/pip install -q -U -e ./apps/frappe
Updating node packages…
$ yarn install
00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: ‘install’

Not sure it would be a problem after adding new site and new app (erpnext v13).

1 Like

Then adding new site and new app. Another error occurs:

frappe@ubuntu:~/frappe-bench13$ bench new-site --admin-password admin --force site13.local
MySQL root password:
Creating Database…
11.9KiB 0:00:00 [ 322MiB/s] [==============================================================================>] 100%

Installing frappe…
Updating DocTypes for frappe : [========================================] 100%
Updating country info : [========================================] 100%
*** Scheduler is disabled ***
Current Site set to site13.local

frappe@ubuntu:~/frappe-bench13$ bench get-app erpnext --branch version-13-beta
INFO:bench.app:Getting app erpnext
$ git clone GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP) --branch version-13-beta --depth 1 --origin upstream
Cloning into ‘erpnext’…
remote: Enumerating objects: 7055, done.
remote: Counting objects: 100% (7055/7055), done.
remote: Compressing objects: 100% (5730/5730), done.
remote: Total 7055 (delta 1909), reused 3234 (delta 1068), pack-reused 0
Receiving objects: 100% (7055/7055), 15.36 MiB | 2.57 MiB/s, done.
Resolving deltas: 100% (1909/1909), done.
INFO:bench.app:installing erpnext
$ ./env/bin/pip install -q -U -e ./apps/erpnext
$ bench build --app erpnext
Usage: yarn [options]

yarn: error: no such option: --app

1 Like

After many attempts, setting up production mode, bench update, changing site port, reloading supervisor and nginx, etc. The v13beta4 site with new port did came up. But the website (login page) shows nothing but the Home/Login link and Built on Frappe footer. Nothing on browser’s log. Oh well. :frowning:

1 Like

I’m also getting it as a warning when I run migrate-env.

1 Like