Open vishwa742 opened 3 years ago
Also having this same issue. Keen to know how to fix it.
Steps:
+1, same issue when installed globally and when installed in the project dependencies and using npx to execute it. In src/init.js the code argv.$0
is using the path to the bin script, not the script name.
A quick workaround, until this is solved, is to make a symlink in the current directory:
ln -s ./node_modules/.bin/big-widget big-widget
Then call init through that:
./big-widget init
Thanks for reporting this, @vishwa742 and apologies that I haven't had the bandwidth to address it yet. I suspect this has something to do with developing in a Windows environment vs. a Unix-based environment, but I haven't had a chance to validate that yet. I'll follow up once I am able to test on a Windows machine.
In the meantime, I wanted to make sure that you're aware that BigCommerce released an official Widget Builder tool. It is documented here and, honestly, is a bit nicer than big-widget: https://developer.bigcommerce.com/api-docs/storefront/widgets/widget-builder
@hatertron3000 FYI I'm having similar issue on MBP M1 Max
@hatertron3000 I am also able to reproduce this on my MacBook Pro 2017 MacOS 11.6 (not M1 chip)
@hatertron3000 here's the output:
Error during initializationn
[Error: ENOENT: no such file or directory, open 'config.node_modules/.bin/big-widget.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: 'config.node_modules/.bin/big-widget.json'
}
I created a config.big-widget.json file and populated it with the response from creating the widget using the request runner
I was hoping you could tell me where I'm going wrong. Thanks
Error:
Initializing the project... Error during initializationn [Error: ENOENT: no such file or directory, open 'C:\Users\vichu\OneDrive\Desktop\Widgets\secrets.C:\Program Files\nodejs\node_modules\big-widget\bin\big-widget.json'] { errno: -4058, code: 'ENOENT', syscall: 'open', path: 'C:\\Users\\vichu\\OneDrive\\Desktop\\Widgets\\secrets.C:\\Program ' + 'Files\\nodejs\\node_modules\\big-widget\\bin\\big-widget.json' }