Multipass errors when creating snap with electron forge

Hello

I’m trying to create a snap file using electron forge but I’m getting the following error.

⠋ Making for target: snap - On platform: linux - For arch: x64  electron-installer-snap:snapcraft Running '/snap/bin/snapcraft snap --target-arch=amd64 --output=/home/rmaheshwari/Desktop/core/*****/apps/linux/out/make/snap/x64/appname_10.0.0-0_amd64.snap' in /tmp/electron-snap-98731hFB7khOOwLiP +0ms
⠧ Making for target: snap - On platform: linux - For arch: x64Ignoring '--target-arch' flag.  This flag requires --destructive-mode and is unsupported with Multipass and LXD build providers.
Launching a VM.
Build environment is in unknown state, cleaning first.
⠇ Making for target: snap - On platform: linux - For arch: x64/snap/multipass/5678/bin/launch-multipass: 3: export: /usr/sbin: bad variable name
/snap/multipass/5678/bin/launch-multipass: 3: export: /usr/sbin: bad variable name
An error occurred with the instance when trying to launch with 'multipass': returned exit code 2.
Ensure that 'multipass' is setup correctly and try again.
✖ Making for target: snap - On platform: linux - For arch: x64

An unhandled error has occurred inside Forge:
An error occured while making for target: snap
Command failed with a non-zero return code (2):
/snap/bin/snapcraft snap --target-arch=amd64 --output=/home/rmaheshwari/Desktop/core/*****/apps/linux/out/make/snap/x64/appname_10.0.0-0_amd64.snap
Error: Command failed with a non-zero return code (2):
/snap/bin/snapcraft snap --target-arch=amd64 --output=/home/rmaheshwari/Desktop/core/*****/apps/linux/out/make/snap/x64/appname_10.0.0-0_amd64.snap
    at ChildProcess.<anonymous> (/home/rmaheshwari/Desktop/core/*****/apps/linux/node_modules/@malept/cross-spawn-promise/src/index.ts:172:16)
    at ChildProcess.emit (events.js:400:28)
    at ChildProcess.emit (domain.js:470:12)
    at maybeClose (internal/child_process.js:1055:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! appname@10.0.0-0 make: `electron-forge make`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the appname@10.0.0-0 make script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/rmaheshwari/.npm/_logs/2021-09-22T21_09_00_336Z-debug.log

I am able to build a deb package properly using electron forge.
I’ve tried to purge multipass and reinstall it and also tried the edge channel for it but still no luck.

How do I address this issue? Any help will be appreciated!
Thanks!