Troubleshooting the Developer Tools

This topic applies to

Applies to

SuiteCommerce Web Stores

The following are known problems or errors that you may encounter when installing or running the developer tools:

Error Messages When Running the Developer Tools

You may encounter the following errors when you deploy themes, extensions, and other customizations to NetSuite. They may occur when NetSuite runs with two-factor authentication and you do not properly sign in with the SCDeployer role:

Error INVALID_LOGIN_ATTEMPT Invalid login attempt.

This error occurs when deploying or fetching using a role that requires 2FA. To fix this error, log into NetSuite using the developer tools and choose the SCDeployer role. Include the ––to parameter to any fetch or deploy command to trigger the developer tols to prompt you for new login information.

Error INSUFFICIENT_PERMISSION You do not have privileges to view this page

This error occurs if the SCDeployer role is added to the Employee Record, but the Audience in the Restlet Script Deployment is not added correctly for the role.

See Edit Script Deployment Records for more information on setting this up correctly.

Error When Running Gulp.js Commands

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

This topic applies to

Applies to

Mont Blanc and later

Sass Compilation Errors when Running Gulp

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

This topic applies to

Applies to

Mont Blanc

Source Code Error When Running Gulp

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