Troubleshooting the Developer Tools

The following are known problems or errors that you may encounter when installing or running the developer tools. You can go to the section that describes the error to learn more:

startDeploy Errored: Cannot Read Property 'files' of Undefined at deployData.forEach.deploy

The gulp theme:deploy and gulp extension:deploy commands use SuiteScript Restlet service requests to upload your theme and extension development files to the NetSuite file cabinet. And, SuiteScript’s governance model limits the number of units each Restlet request can use. For more information, see SuiteScript Governance and Limits.

The chunk_size property in the <Top-LevelDevelopmentDirectory/gulp/config/config.json file controls how many files are uploaded per Restlet request. Each Restlet request has a fixed number of units that it can consume per the SuiteScript governance model. The number of units required to upload each file to the NetSuite file cabinet varies based on the number of nested folders within your theme or extension development files. More complex directory structures consume more units.

If you receive this error for a theme or extension that has a complex directory structure, reducing the value of the chunk_size property from the default setting of 80 may resolve the issue.

Note:

You can also adjust the chunk_size property if you need to speed up deployment. Increasing the number of files uploaded per request should speed up the process because the deployment will require fewer requests to the Restlet.

Error Messages When Running the Developer Tools

You may encounter the following errors when you deploy themes, extensions, and other customizations to NetSuite.

Invalid Assignment Left-Hand Side

This error may occur with Vinson implementations of SuiteCommerce Advanced (SCA) when deploying or fetching using the SCA developer tools. This error occurs when the required version of Node.js for your implementation is not compatible with the xmlbuilder version that is installed. Complete the following steps to correct this issue.

  1. Within the developer environment path, go to:

    ./node_modules/xml2js

  2. Run this command: npm install xmlbuilder@11.0.0

  3. To ensure xmlbuilder@11.0.0 has overwritten the previous version, run: npm list xmlbuilder

  4. If the preceding command returns any version other than xmlbuilder@11.0.0, you need to install version 11.0.0 in the directory where the version is not correct.

    For example, if the preceding command returns version information that shows a version other than xmlbuilder@11.0.0 within one of the folders in the node_modules directory, go to that folder and run this command: npm install xmlbuilder@11.0.0

  5. To ensure xmlbuilder@11.0.0 has overwritten the previous version, run: npm list xmlbuilder

TypeError: out.writeUint32LE is not a function

This error may occur with Vinson implementations of SuiteCommerce Advanced (SCA) when deploying or fetching using the SCA developer tools. This error occurs when the required version of Node.js for your implementation is not compatible with installed versions of the font converter tools, ttf2eot and ttf2woff. Complete the following steps to correct this issue.

From the root directory of SCA:

  1. Go to: node_modules/gulp-ttf2woff

  2. Run this command: npm install ttf2woff@2.0.2

  3. Then go to: node_modules/gulp-ttf2eot

  4. Run this command: npm install ttf2eot@2.0.0

Error INVALID_LOGIN_ATTEMPT Invalid login attempt

This error occurs when deploying or fetching using a role that requires 2FA. You must specify a role that provides the permissions needed to deploy to NetSuite. By default, the Administrator and SCDeployer roles provide these permissions. To learn more, including how to create a custom role that provides the required permissions, see Developer Tool Roles and Permissions.

Error INSUFFICIENT_PERMISSION You do not have privileges to view this page

This error occurs when you add a role that has appropriate fetch/deploy permissions to an Employee Record, but the Audience in the Restlet Script Deployment is not added correctly for the role.

See Create a Custom Role with Fetch and Deploy Permissions for more information on setting this up correctly.

Sass-Related Error

When running gulp with an unsupported version of Node.js you may encounter a Sass-related error similar to the following:

            gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit 
(/home/sg/netsuite/ml/node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/lib/build.js:272:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit 
(internal/child_process.js:200:12)
gyp ERR! System Linux 3.13.0-37-generic
gyp ERR! command "/usr/local/bin/node" 
"/home/sg/netsuite/ml/node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/bin/node-gyp" 
"rebuild"
gyp ERR! cwd
/home/sg/netsuite/ml/node_modules/gulp-sass/node_modules/node-sass
gyp ERR! node -v v4.0.0
gyp ERR! pangyp -v v2.3.2
gyp ERR! not ok
Build failed 

          

Resolution: Ensure that you are using Node.js version 0.12.x or older.

Gulp.js Version Mismatch

When running gulp, you may see a warning message related to a version mismatch. This is due to a mismatch between the version installed globally on your system and the version used by the developer tools.

Resolution: This warning is expected and does not cause problems with the developer tools.

Warning Messages Related to GIT

This error is caused by the Sass compiler which expects a GIT server to be installed.

Resolution: This warning is expected and does not cause problems with the developer tools.

ENOSPC Error When Running Local Server

On UNIX systems, the gulp watch command (used when running a local server) may return this exception. This is caused when the gulp process exceeds the limit of files that can be watched by the system.

Resolution: Enter the following command to resolve this issue:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

EMFILE Error When Running a Local Server

On UNIX systems, the gulp local command may return this exception if the gulp process exceeds the limit of files that can simultaneously be opened.

Resolution: Enter the following command to increase the system limit on the number of files that can simultaneously be opened.

ulimit -n 2048

Sass Compilation Errors when Running Gulp

This information refers to the Mont Blanc release of SuiteCommerce Advanced and later.

Changes to the developer tools source code may be required to mitigate errors in Sass compilation when deploying.

SCA uses gulp-sass for compiling .scss files. Node-sass (v3.5), which is a dependency of gulp-sass, has caused some Sass code that previously compiled fine to throw fatal errors, particularly in Bootstrap. These errors are returned when running the gulp local command to start your local server or when deploying with gulp deploy.

The errors returned begin as follows:

            formatted Error: You may not @extend an outer selector form within @media you may only @extend selectors within the same directive. … [etc] 

          

To correct the compilation errors:

  1. Open the command line in the project <Source Code> directory.

  2. Execute the following commands to remove the 3.5 dependency and install the expected version.

    npm cache clear

    npm uninstall gulp-sass node-sass

    npm config set save-exact true

    npm install --save node-sass@3.4.1 gulp-sass@2.1.0

    Note:

    This will modify your package.json. Preserve these changes.

  3. Run gulp local to validate that the error is resolved.

If you have also installed gulp-sass globally, you might need to uninstall the globals.

To uninstall gulp-sass globals:

  1. Open the command line in the top-level directory of your Mont Blanc source code.

  2. If you are a Windows user, execute the following command as either Administrator or as a User:

    npm uninstall -g node-sass gulp-sass

  3. If you are a Linux / Mac user, execute the following command as Administrator:

    npm uninstall -g node-sass gulp-sass sudo

    npm uninstall -g node-sass gulp-sass

Source Code Error When Running Gulp

This information refers to the Mont Blanc release of SuiteCommerce Advanced or later.

When deploying source files, you might encounter the following error:

            SOURCE CODE ERROR. Error: You may not @extend an outer selector from within @media. You may only @extend selectors within the same directive. 

          

If this occurs, a mismatch of node-sass versions exists between the package.json files located in the top-level directory and the node_modules/gulp-sass directory. To fix this error, perform the following.

To correct the Source Code Error:

  1. Open the command line in the top-level directory of your source code.

  2. Execute the following commands:

    Windows Users

                      npm install -g npm
    npm cache clear
    npm uninstall gulp-sass
    npm uninstall node-sass
    npm config set save-exact true
    npm install node-sass@3.4.1 --save
    npm install --save gulp-sass@2.1.0 
    
                    

    Linux/Mac Users

                      sudo npm install -g npm 
    npm cache clear
    npm uninstall gulp-sass
    npm uninstall node-sass
    npm config set save-exact true
    npm install node-sass@3.4.1 --save
    npm install --save gulp-sass@2.1.0 
    
                    
    Note:

    This modifies the package.json file. Preserve these changes.

  3. Run gulp local to validate that the error is resolved.

If you have also installed gulp-sass globally, you might need to uninstall the globals.

To uninstall gulp-sass globals:

  1. Open the command line in the top-level directory of your source code.

  2. If you are a Windows user, execute the following command as either Administrator or as a User:

    npm uninstall -g node-sass gulp-sass

  3. If you are a Linux / Mac user, execute the following command as Administrator:

    npm uninstall -g node-sass gulp-sass

    sudo npm uninstall -g node-sass gulp-sass

Related Topics

Commerce Developer Tools Reference
Token Based Authentication
Mixed Domains in a Local Server
Secure HTTP (HTTPS) with the Local Server

General Notices