SuiteCommerce Extension – First Setup

an error has occurred

NetSuite updates its SuiteCommerce Extension Management tools a few times a year and I always forget that it requires overcoming a few hiccups. This post is to remind me of those hiccups.

The first issue happens when I run any gulp command and try to create a new token. The browser opens a new page to complete the token issue but instead of the page that asks me to allow token creation I get the dreaded “An unexpected error has occurred” page. This is caused by a small bug in the code that builds the url for the web page. Here is the fix:

// Find this 
const hostnameStep1 = this.vm ? hostName : `rest${molecule}.netsuite.com`; 
// And replace it with this 
const hostnameStep1 = this.vm ? hostName : `system${molecule}.netsuite.com`;