Deploy to NetSuite Fails with Errors

Developers working with the 2019.2 and 2020.1 releases of SuiteCommerce Advanced may not be able to successfully deploy to NetSuite and may receive errors when trying to deploy.

This issue has been fixed in the 2020.2 release of SuiteCommerce Advanced. If you experience this issue and cannot migrate to the latest release, you can fix this issue as described in the following steps.

  1. Open the following file in the gulp directory for the release your are working with:

    Release

    File Location

    2019.2

    .../SC_19.2_Live/gulp/tasks/javascript.js

    2020.1

    .../SC_20.1/gulp/tasks/javascript.js

  2. Find both instances where the handleOverrides method is called and add 'javascript' as shown in the following example:

                                  .pipe(package_manager.handleOverrides('javascript')) 
    
                
    Important:

    Be sure to change both instances where the handleOverrides method is called.

  3. Open the following file in the gulp directory for the release your are working with:

    2019.2

    .../SC_19.2_Live/gulp/package-manager/index.js

    2020.1

    .../SC_20.1/gulp/package-manager/index.js

  4. Find the handleOverrides method definition and add a resource parameter as shown in the following example:

                                  handleOverrides: function(resource) { 
    
                
  5. In the handleOverrides method, find the following code:

                                  if (override_info.isOverriden) {
                        // if original file is overridden replace its stat and content.
                        // stat needs to change for other
                        // gulp-plugins to work properly (i.e. changed)
    
                        override_info.file = file;
                        override_info.file.stat = fs.statSync(
                            override_info.overridePath.replace(/\.js$/, '.ts')
                        );
                        return;
                    } 
    
                
  6. And replace it with the following code:

                                  if (override_info.isOverriden) {
                        // if original file is overridden replace its stat and content.
                        // stat needs to change for other
                        // gulp-plugins to work properly (i.e. changed)
                        override_info.file = file;
                        const { overridePath } = override_info;
                        if (resource === 'javascript') {
                            override_info.file.stat = fs.statSync(overridePath.replace(/\.js$/, '.ts'));
                        } else {
                            override_info.file.stat = fs.statSync(overridePath);
                        }
                        return;
                    } 
    
                
  7. After editing and saving the files described in the preceding steps, run the gulp deploy command as described in Deploy SCA Customizations to NetSuite to make sure deployments are working as expected.

General Notices