Bypass 'ns-logs' Missing Error: Creating a New SuiteCommerce Extension by Hand

in , December 16th, 2024
white and silver computer keyboard

When running “gulp extension:create” or even “npx gulp extension:create”, you may run into some error that ‘ns-logs’ is missing. The next logical step might be to run “npm install ‘ns-logs’”; however, running that command now leads to a 404 error. With the failure of gulp extension:create, if you want to create a new SuiteCommerce extension, you need to do so manually. Here’s how:

Copy an Existing SuiteCommerce Extension

Under Extensions > Workspace, copy the folder of an already existing extension. Try to find an extension that has all the features your new extension will need, such as templates, SASS, and/or SuiteScript2. Rename the folder to the name of your new extension. Make sure this name only contains alphabetical characters and no spaces or special symbols.

Rename the Extension’s Directories

Inside your new extension folder, navigate through the Modules folder, and then rename the next folder to reflect the name of your new extension. Within the JavaScript folders and other features your extension includes, rename each document to reflect your new extension. For example, “OldExtension.Entry.js” could be renamed to “NewExtension.Entry.js”. If the extension you’re copying has some features from the old extension that will not be needed, such as configuration, you may delete that folder entirely.

Modify manifest.json

In your new extension folder, open the manifest.json file. Modify the entries for “name”, “fantasyName” (which is how your extension’s name will be displayed in the Extension Manager; in this case you are allowed and encouraged to use spaces), “vendor”, “version”, and “description”. Under the “javascript” entry and other feature entries, rename the directories for the files to reflect what you have renamed your folders and files to. If you removed some feature, such as configuration, you will erase the file directory string in the feature’s “file” array so that it is empty.

Modify config.json

Navigate to your Extensions folder, then gulp > config > config.json. Under “folders” > “extensions_path”, you will want to add your new extension’s directory to the array. You only have to enter the workspace folder and the folder name for your new extension, for example, “Workspace/NewExtension”.

General Cleanup of Your SuiteCommerce Extension

From a functional standpoint, this is all you have to do to create a new extension without the usage of gulp. However, do not forget to modify the JSDoc headers and define names in each of your extension’s document to reflect the new extension.

Author: John Baylon


Got stuck on a step in this article?

We like to update our blogs and articles to make sure they help resolve any troubleshooting difficulties you are having. Sometimes, there is a related feature to enable or a field to fill out that we miss during the instructions. If this article didn't resolve the issue, please use the chat and let us know so that we can update this article!

Oracle NetSuite Alliance Partner & Commerce Partner

If you have questions about how our team can support your business as you implement NetSuite or SuiteCommerce, feel free to contact us anytime. Anchor Group is a certified Oracle NetSuite Alliance Partner and Commerce Partner equipped to handle all kinds of NetSuite and SuiteCommerce projects, large or small!

 
 

Want to keep learning?

Our team of NetSuite and ecommerce professionals has written articles on a wide variety of topics, from step-by-step tutorials, to solution recommendations, available support services, and more!

Your cart