cancel
Showing results for 
Search instead for 
Did you mean: 

WEB IDE Error when building application.

former_member239819
Participant

In SAP WEB IDE I'm building my project (Right-Clck + Build).

This was working correctly but now it's erroring with:

4:43:07 PM (Build) Build started. 4:43:10 PM (DIBuild) Build of /rsa-complete-survey in progress 4:43:11 PM (DIBuild) [INFO] Retrieving source code

[INFO] Preparing node environment
[INFO] package.json not modified, skipping npm installation
[INFO] Using recently cached node_modules
[INFO] Node environment ready4:43:15 PM (DIBuild) grunt-cli: The grunt command line interface (v1.2.0)

Fatal error: Unable to find local grunt.

If you're seeing this message, grunt hasn't been installed locally to
your project. For more information about installing and configuring grunt,
please see the Getting Started guide:

http://gruntjs.com/getting-started
[INFO] Build finished in 4 secondsAny ideas?

Accepted Solutions (0)

Answers (18)

Answers (18)

thejk
Explorer

Got the same problem. The fix for me is to change the package.json file (e.q. insert empty line). After saving "package.json" build worked (at least most of the time)

Former Member
0 Kudos

That's working, for real. Thanks!

asaf_bruner
Participant

Hi Adam,

We have detected some unexpected behavior in the npm version we were using and were enforced to upgrade to a newer version that contained the fix. Things should work for you now, please let us know otherwise. We will keep monitoring the issue to make sure it works well.

Best Regards,

Asaf

former_member239819
Participant
0 Kudos

Great

Thank you. All works fine 🙂

rishi_jain5
Explorer
0 Kudos

We were facing similar issue in our project. My teammate, Laura Smith, found out that we used small case letters in one place and capital letters in other. She was able to build after rebuilding with lower case both places (ADT project and namespace).

anudeep_paleru
Explorer
0 Kudos

Please update package.json with below version so that it can able to install necessary npm dependencies

"devDependencies": { "@sap/grunt-sapui5-bestpractice-build": "1.3.56" } }

Former Member
0 Kudos

I have the same issue, I tried all the workaround mentioned above, but not works for me.

Former Member, please provide a formal solution to this issue.

Thanks in advance.

anudeep_paleru
Explorer
0 Kudos

Please update package.json with below version so that it can able to install necessary npm dependencies

"devDependencies": { "@sap/grunt-sapui5-bestpractice-build": "1.3.56" } }

Former Member
0 Kudos

Hello Anudeep, thanks for the response, but even with this new sap/grunt version, the Web IDE failed to deploy the SAPUI5 app:

Build failed.
Please follow the relevant troubleshooting tips below:
ERROR: "Unable to find local grunt"
- Right-click the project folder, select "Clean npm Folder", and build again.
ERROR: "npm ERR! code EINTERGITY"
- Delete the "package-lock.json" file from the project and build again.
[INFO] Build finished in 43 seconds
arthursilva
Active Participant
0 Kudos

Hello,

I've been testing sap npm package @ sap / grunt-sapui5-bestpractice-build": "1.x.xx recently and honestly it's quite unstable, raising unexpected errors over builds. So I've decided to create my own build process that could be found on https://github.com/afuscella/Grunt. The error message Fatal error: Unable to find local grunt is due to the missing grunt package on package.json. File is responsible for indicating NodeJS project.

You may resolve the problem with the following code below:

{
  "name": "crudUI5-manageProducts",
  "version": "0.0.1",
  "description": "",
  "private": true,
  "devDependencies": {
    "grunt-js-bestpractice-build": "^0.1.3",
    "grunt": "^0.4.5",
    "grunt-cli": "^1.2.0"
  },
  "peerDependencies": {
    "grunt": "^0.4.5"
  }
}

Notice that grunt should be added under devDependencies which is responsible to load npm packages into the project. There is a detailed explanation in my blog regarding the use of Grunt in JS projects.

The use of Grunt has been decrease over the years due to its replacement by other technologies, such as Gulp and Webpack. Motivation for the article is related that WebIde is suitable with Grunt, and the use of a task runner might increase considerably the quality of the application deployment with eslint, minification, preload, and so on (depending of the requirement).

See example of package.json and Gruntfile at https://github.com/afuscella/Grunt


BR
Arthur Silva

shabeer_skhan
Explorer
0 Kudos

Hello Everyone,

I had the same problem this morning and I updated the grunt-sapui5 version in package.json as shown below and I'm able to deploy the project from WebIDE Full Stack now. The previous version in package.json was 1.3.50.

"@sap/grunt-sapui5-bestpractice-build": "1.3.19"

Thanks,

Shabeer

0 Kudos

Same with me also, first build was successful, but the second build is failing.

carsten_buechert
Contributor
0 Kudos

Same with me. It seems that every second+ build fails due to missing local grunt.

younghwan_kim
Active Participant
0 Kudos

I created a new project in WEB IDE full-stack, but it fails from the second build.

I got something like this console error.

13:27:17 (DIBuild) [INFO] Invoking grunt
grunt-cli: The grunt command line interface (v1.2.0)
Fatal error: Unable to find local grunt.If you're seeing this message, grunt hasn't been installed locally toyour project. 
For more information about installing and configuring grunt,please see the Getting Started guide:
http://gruntjs.com/getting-started[INFO] Build finished in 76 seconds 
andreas_gall2
Participant
0 Kudos

With today I am receiving the same error again "Unable to find local grunt". I migrated an older project from the "old" WebIDE to the full-stack edition and now can't build/deploy it due to this grunt error that seems to come and go whenever it feels bothering poor developers 😉


Regards, Andreas

andreas_gall2
Participant

Found a possible solution, in package.json the build version was set to "@sap/grunt-sapui5-bestpractice-build": "1.3.50""

I changed it back to 1.3.33 like in other projects and was able to successfully build and deploy.

former_member239819
Participant
0 Kudos

This has now been updated a while..... It just started working again for me.

Former Member
0 Kudos

Waiting for update too, have the same issue!

0 Kudos

Do you have some news about?

nabheetscn
Active Contributor
0 Kudos

Do we have any update here? Facing the same issue:(

nabheetscn
Active Contributor
0 Kudos

Here you go the solution edit your package.json file press a space and save and deploy again. Thanks to Jason Scott for providing solution here

andreas_gall2
Participant
0 Kudos

asaf.bruner as of today we still get error messages. It is either:

"Fatal error: Unable to find local grunt."

or:

(DIBuild) npm ERR! cb() never called!

Regards,

Andreas

verreydthans
Participant
0 Kudos

Hi,

I've the same problem in my Web IDE full stack.
Deleting the codebase and reclone didn't work for me.

asaf.bruner , do you know anything else what we could try to fix this?

Regards,
Hans

Nigel_James
Active Contributor
0 Kudos

I am getting the same error after a successful deployment on Friday. ( Now Monday morning )

asaf.bruner Is there something I can do to give npm a shake, like pushing a inconsequential change to package.json ?

Nigel_James
Active Contributor

In order to resolve this I needed to delete the codebase from WebIDE Full Stack and reclone from source control.

Only then could I rebuild.

If I have to do this every time it will be a big productivity loss.

I hope you are able to resolve the issue.

Nigel_James
Active Contributor
0 Kudos

I also needed to Activate the BSP application on gateway before the application would deploy.

I was getting the error:

Could not deploy application <bsp-application-name>/<filepath>/LIBRARY.JS is inactive.