Current behavior when executing swanky phala contract test -t contract_name. I've tried multiple solutions but none seem to work. This did work in the past, but there is nothing obvious to me as to why this error is happening.
┌─[hashwarlock@wrlx-tun311-33] - [~/Projects/Phala/Swanky/TestSwanky/TestLocal] - [Tue Jun 20, 19:32]
└─[$]> DEBUG=* swanky phala contract test -t http_client
config reading core plugin /usr/local/lib/node_modules/@astar-network/swanky-cli +0ms
config loadJSON /usr/local/lib/node_modules/@astar-network/swanky-cli/package.json +0ms
config loadJSON /usr/local/lib/node_modules/@astar-network/swanky-cli/oclif.manifest.json +0ms
config:@astar-network/swanky-cli using manifest from /usr/local/lib/node_modules/@astar-network/swanky-cli/oclif.manifest.json +0ms
config reading user plugins pjson /home/hashwarlock/.local/share/swanky/package.json +0ms
config loadJSON /home/hashwarlock/.local/share/swanky/package.json +0ms
config loading plugins [ { name: '@phala/swanky-plugin-phala', tag: 'latest', type: 'user' } ] +1ms
config reading user plugin /home/hashwarlock/.local/share/swanky/node_modules/@phala/swanky-plugin-phala +0ms
config loadJSON /home/hashwarlock/.local/share/swanky/node_modules/@phala/swanky-plugin-phala/package.json +0ms
config loadJSON /home/hashwarlock/.local/share/swanky/node_modules/@phala/swanky-plugin-phala/oclif.manifest.json +0ms
config:@phala/swanky-plugin-phala using manifest from /home/hashwarlock/.local/share/swanky/node_modules/@phala/swanky-plugin-phala/oclif.manifest.json +0ms
config loading plugins [ '@oclif/plugin-help', '@oclif/plugin-version' ] +2ms
config reading user plugin /home/hashwarlock/.local/share/swanky/node_modules/@oclif/plugin-help +0ms
config loadJSON /home/hashwarlock/.local/share/swanky/node_modules/@oclif/plugin-help/package.json +0ms
config reading user plugin /home/hashwarlock/.local/share/swanky/node_modules/@oclif/plugin-version +0ms
config loadJSON /home/hashwarlock/.local/share/swanky/node_modules/@oclif/plugin-version/package.json +0ms
config loadJSON /home/hashwarlock/.local/share/swanky/node_modules/@oclif/plugin-help/oclif.manifest.json +0ms
config loadJSON /home/hashwarlock/.local/share/swanky/node_modules/@oclif/plugin-version/oclif.manifest.json +0ms
config:@oclif/plugin-help using manifest from /home/hashwarlock/.local/share/swanky/node_modules/@oclif/plugin-help/oclif.manifest.json +0ms
config:@oclif/plugin-version using manifest from /home/hashwarlock/.local/share/swanky/node_modules/@oclif/plugin-version/oclif.manifest.json +0ms
config loading plugins [
'@oclif/plugin-help',
'@oclif/plugin-version',
'@oclif/plugin-plugins'
] +2ms
config reading core plugin /usr/local/lib/node_modules/@astar-network/swanky-cli/node_modules/@oclif/plugin-help +0ms
config loadJSON /usr/local/lib/node_modules/@astar-network/swanky-cli/node_modules/@oclif/plugin-help/package.json +0ms
config reading core plugin /usr/local/lib/node_modules/@astar-network/swanky-cli/node_modules/@oclif/plugin-version +0ms
config loadJSON /usr/local/lib/node_modules/@astar-network/swanky-cli/node_modules/@oclif/plugin-version/package.json +0ms
config reading core plugin /usr/local/lib/node_modules/@astar-network/swanky-cli/node_modules/@oclif/plugin-plugins +0ms
config loadJSON /usr/local/lib/node_modules/@astar-network/swanky-cli/node_modules/@oclif/plugin-plugins/package.json +0ms
config loadJSON /usr/local/lib/node_modules/@astar-network/swanky-cli/node_modules/@oclif/plugin-version/oclif.manifest.json +0ms
config loadJSON /usr/local/lib/node_modules/@astar-network/swanky-cli/node_modules/@oclif/plugin-help/oclif.manifest.json +0ms
config loadJSON /usr/local/lib/node_modules/@astar-network/swanky-cli/node_modules/@oclif/plugin-plugins/oclif.manifest.json +0ms
config:@oclif/plugin-version using manifest from /usr/local/lib/node_modules/@astar-network/swanky-cli/node_modules/@oclif/plugin-version/oclif.manifest.json +0ms
config:@oclif/plugin-help using manifest from /usr/local/lib/node_modules/@astar-network/swanky-cli/node_modules/@oclif/plugin-help/oclif.manifest.json +0ms
config:@oclif/plugin-plugins using manifest from /usr/local/lib/node_modules/@astar-network/swanky-cli/node_modules/@oclif/plugin-plugins/oclif.manifest.json +0ms
config config done +2ms
config start init hook +0ms
config init hook done +1ms
config runCommand phala:contract:test [ '-t', 'http_client' ] +0ms
config:@phala/swanky-plugin-phala (require) /home/hashwarlock/.local/share/swanky/node_modules/@phala/swanky-plugin-phala/dist/commands/phala/contract/test.js +739ms
config start prerun hook +735ms
config prerun hook done +0ms
swanky:phala:contract:test init version: @oclif/core@2.5.0 argv: [ '-t', 'http_client' ] +0ms
[StackBinaryDownloader] Preparing Phala stack release
✔ Checking releases directory
✔ Checking target release binaries
Running test suite for contracts
mocha:suite slow 75 +0ms
mocha:suite timeout 600000 +0ms
mocha:mocha configured 0 global setup functions +0ms
mocha:mocha configured 0 global teardown functions +1ms
mocha:runnable timeout 600000 +0ms
mocha:runnable slow 75 +0ms
mocha:runnable timeout 600000 +0ms
mocha:runnable slow 75 +0ms
/home/hashwarlock/Projects/Phala/Swanky/TestSwanky/TestLocal/tests/http_client/http_client.test.ts:1
import { ContractType } from '@devphase/service';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at Object.compileFunction (node:vm:360:18)
at wrapSafe (node:internal/modules/cjs/loader:1088:15)
at Module._compile (node:internal/modules/cjs/loader:1123:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at Module.require (node:internal/modules/cjs/loader:1061:19)
at require (node:internal/modules/cjs/helpers:103:18)
at /home/hashwarlock/.local/share/swanky/node_modules/mocha/lib/mocha.js:414:36
at Array.forEach (<anonymous>)
This error is not present when I execute as a standalone command phala phala contract test -t http_client. This only errors out when installed as a plugin for swanky.
Description
Current behavior when executing
swanky phala contract test -t contract_name
. I've tried multiple solutions but none seem to work. This did work in the past, but there is nothing obvious to me as to why this error is happening.