cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Smart Edit: Unable to find local grunt

0 Kudos
3,448

Hi All,

I'm getting below error when I try to run ant clean build after installing npm packages (ant npminstall) in hybris6.7v.

   [exec] Result: 1
  [echo] Running grunt packageSkipTests
  [exec] grunt-cli: The grunt command line interface (v1.2.0)
  [exec]
  [exec] Fatal error: Unable to find local grunt.
  [exec]
  [exec] If you're seeing this message, grunt hasn't been installed locally to
  [exec] your project. For more information about installing and configuring grunt,
  [exec] please see the Getting Started guide:
  [exec]
  [exec] http://gruntjs.com/getting-started

BUILD FAILED D:\Projects\AGCO\HYB67\hybris\bin\platform\build.xml:20: The following error occurred while executing this line: D:\Projects\AGCO\HYB67\hybris\bin\platform\resources\ant\compiling.xml:90: The following error occurred while executing this line: D:\Projects\AGCO\HYB67\hybris\bin\platform\resources\ant\compiling.xml:131: The following error occurred while executing this line: D:\Projects\AGCO\HYB67\hybris\bin\platform\resources\ant\util.xml:49: The following error occurred while executing this line: D:\Projects\AGCO\HYB67\hybris\bin\platform\resources\ant\util.xml:51: The following error occurred while executing this line: D:\Projects\AGCO\HYB67\hybris\bin\platform\resources\ant\compiling.xml:138: The following error occurred while executing this line: D:\Projects\AGCO\HYB67\hybris\bin\platform\resources\ant\compiling.xml:284: The following error occurred while executing this line: D:\Projects\AGCO\HYB67\hybris\bin\platform\resources\ant\util.xml:146: The following error occurred while executing this line: D:\Projects\AGCO\HYB67\hybris\bin\ext-content\smartedit\buildcallbacks.xml:68: The following error occurred while executing this line: D:\Projects\AGCO\HYB67\hybris\bin\ext-content\npmancillary\buildcallbacks.xml:262: exec returned: 99

Any suggestions. Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

arvind-kumar_avinash
Active Contributor

Please delete node_modules folder from all extensions (e.g. cmssmartedit, smartedit, personalizationsmartedit, backoffice, npmancillary; wherever you find) and then execute ant clean all.

Former Member

If we delete node_modules in npmancillary and other extenions and clean all the code,then how the grunt js files will form?

All the required modules will be there in the npmanciallry node_modules folder. Please explain me if am wrong,because i am getting the same error while building the code and i followed what you said. But my newly added js file is not reflecting in Grunt file. for example: smartedittraing.js and smartedittrainingcontainer.js

Answers (2)

Answers (2)

@sumit I ran the ant npminstall and ant clean all commands in command prompt as admin user(open the command prompt and run as administrator). That solves the problem.

0 Kudos

Hi Arvind, I can see node_modules under npmancillary. Not in other extensions. Also not understand why we are deleting node_modules from npmancillary?

I have remvoed the node_modules from npmancillary and build success.

Thanks Jwala

0 Kudos

It will re-import the npm dependencies.