I am trying to execute a script in my truffle project. The script is located in the scripts folder. But whether I run the command from within the root of the project or inside the scripts folder, it cant seem to find my file. I am using command truffle exec deploy-pool.js --network bscTestnet
and truffle exec scripts/deploy-pool.js --network bscTestnet
PS D:\Blockchain\pancake\pancakeswap-core\scripts> truffle exec deploy-pool.js --network bscTestnet
Using network 'bscTestnet'.
Error: ENOENT: no such file or directory, open 'D:\Blockchain\pancake\pancakeswap-core\scripts\deploy-pool.js'
at Object.openSync (fs.js:458:3)
at Object.readFileSync (fs.js:360:35)
at Object.file (C:\Users\DELL\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\require\require.js:28:1)
at Object.exec (C:\Users\DELL\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\require\require.js:121:1)
at internal/util.js:297:30
at new Promise (<anonymous>)
at bound exec (internal/util.js:296:12)
at C:\Users\DELL\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\core\lib\commands\exec.js:88:1
Truffle v5.1.49 (core: 5.1.49)
Node v12.18.0