Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receive the following message when trying to initialize big-widget #10

Open
vishwa742 opened this issue Oct 16, 2021 · 6 comments
Open
Assignees

Comments

@vishwa742
Copy link

vishwa742 commented Oct 16, 2021

Error

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' }

@jasonmitchell42
Copy link

Also having this same issue. Keen to know how to fix it.

Steps:

  1. Installed big-widget globally (npm i -g big-widget)
  2. created directory for new widget (empty)
  3. ran big-widget init and entered information
  4. Received the error as shown in the screenshot above.

@keobrien
Copy link

+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

@hatertron3000
Copy link
Owner

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 hatertron3000 self-assigned this Dec 3, 2021
@marcinkrzeminski
Copy link

@hatertron3000 FYI I'm having similar issue on MBP M1 Max

@keobrien
Copy link

keobrien commented Dec 8, 2021

@hatertron3000 I am also able to reproduce this on my MacBook Pro 2017 MacOS 11.6 (not M1 chip)

@marcinkrzeminski
Copy link

@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'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants