cancel
Showing results for 
Search instead for 
Did you mean: 

CAP HDI deployment error: cannot find module core-util-is

miltonc
Product and Topic Expert
Product and Topic Expert
3,163

Suddenly started getting an error during deployment (in the hdi deployer) about not finding module core-util-is. Deployment used to work fine before.

  • I installed the core-util-is in the package.json file, but I still run into the same issue
  • In mta.yaml file, I used to ignore the node_modules folder when creating the mtar file. I removed the section to ignore the node_modules folder. Still running into the same issue during deployment

Any ideas why I am suddenly running into this issue ? Like I mentioned, deployment used to work fine before...

faebulicious
Explorer
0 Kudos

Facing the same issue right now. Used to work yesterday...

sparikh
Discoverer
0 Kudos

I am also facing the same issue. Please update if you get any solution.

DevPalanimuthu
Product and Topic Expert
Product and Topic Expert
0 Kudos

facing same here. Used to work till yesterday. Please share if you get a resolution.

vishal2052
Product and Topic Expert
Product and Topic Expert
0 Kudos

even I am also facing the same issue

cguttikonda24
Participant
0 Kudos

Make sure the version of HDI-DEPLOY to 4.8.0 instead of the latest. Seems to be an issue with latest version.

cdlom
Explorer
0 Kudos

How can i do this from MTA file?

"Make sure the version of HDI-DEPLOY to 4.8.0 instead of the latest. Seems to be an issue with latest version."

Thanks!

cguttikonda24
Participant

In your DB folder create a package.json and have the version as below.

This resolved our issue of deployment

cguttikonda24
Participant
0 Kudos

The default mbt build adds the package.json in your gen folder with version with caret ^4 which picks the latest version.

As the latest version has some issue, need to specify the exact version to resolve the issue.

gregorw
Active Contributor
0 Kudos

Please search before posting as 2 hours earlier Version issue with @sap/hdi-deploy 4.8.1 was posted.

cdlom
Explorer

Worked , thanks cguttikonda_henkel. Regards

jain_mrce1989
Discoverer
0 Kudos

How can this be fixed if we already have existing package file but doesnt have reference to hdi-deploy?

How we downgrade in that case?

if we create new package file? what should be naming convention as system allows only one package.json file?

Willem_Pardaens
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Rohan,

There is no need to change your existing package.json. The temporary fix mentioned by Chankya above is a new package.json file in the /db folder. If you're familiar with the HDI deployment process you know the database deployer is a separate app so has nothing to do with your main package.json

sriharsha_cr
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello cguttikonda_henkel,

Your solution is helpful and it resolved my deployment issue👍

Thank you

Harsha

Willem_Pardaens
Product and Topic Expert
Product and Topic Expert
0 Kudos

Resolved: New version 4.8.2 of the @sap/hdi-deploy module has been released a moment ago (https://www.npmjs.com/package/@sap/hdi-deploy/v/4.8.2). It should be picked up automatically if you revert your project back to before implementing manual fixes.

Accepted Solutions (0)

Answers (4)

Answers (4)

Willem_Pardaens
Product and Topic Expert
Product and Topic Expert

The SAP development team for the HDI Deployer has been notified of the issue. We'll let you know once a fix is available.

0 Kudos

Hi willem.pardaens,

We are using hdi-deploy downgrade version, still showing the same error:



Please let us know, the resoultion to fix this.

Willem_Pardaens
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Asif,

That is not the correct approach to solve this. Please have a look at the package.json below from Mauricio, which is a new file in the db folder. Specifying this file referencing 4.8.0 makes sure the 'cds build' command doesn't generate its default file referencing 4.8.1

0 Kudos

Hi Willem,

We actually using the version of @sap-deploy:^4.5.3 only till yesterday, and we have had no issues.
As suggested, we tried the 4.8.0 version but still had the same issue.

Willem_Pardaens
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi, you should read my response again and make the correct changes..

ark_ade
Explorer
0 Kudos

Hi, my team tried your suggested workaround but the db deployer component is still not working

mayank_thakursap
Explorer
0 Kudos

Hi ,

I tried the suggested workaround, but it did not work. Any other approach for solving this issue ?

Regards:

Mayank Thakur

0 Kudos

Hi Willem,

The issue is resolved. Thanks for Mauricio Lauffer's code.

Willem_Pardaens
Product and Topic Expert
Product and Topic Expert
0 Kudos

Resolved: New version 4.8.2 of the @sap/hdi-deploy module has been released a moment ago (https://www.npmjs.com/package/@sap/hdi-deploy/v/4.8.2). It should be picked up automatically if you revert your project back to before implementing manual fixes.

nicoschoenteich
Developer Advocate
Developer Advocate

I believe this issue is back with @sap/hdi-deploy version 4.9.0. Can someone please also test this before we report?

mpah
Explorer

I can confirm this issue with 4.9.0 as well. For now we will be using the old workaround with the package.json defined inside the db folder with the fixed version at 4.8.2 again.

egor_t
Explorer

It's back.

Looks new release is related to recent vulnerability https://me.sap.com/notes/3411067.

Binding to previous version works:

dependencies": {

"@sap/hdi-deploy": "4.8.2"

}

Willem_Pardaens
Product and Topic Expert
Product and Topic Expert
0 Kudos

Resolved: New version 4.9.1 of the @sap/hdi-deploy module has been released a moment ago (https://www.npmjs.com/package/@sap/hdi-deploy/v/4.9.1). It should be picked up automatically if you revert your project back to before implementing manual fixes.

rajyabtp
Discoverer

Hi All,

I am facing same error with @sap-deploy:^4.8.0. Any solution?

Thanks,

Rajyalakshmi

mauriciolauffer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Make sure you're really installing it, not just manually changing the version in the package.json file. Installing will ensure both package.json and package-lock.json are updated. Do NOT manually change version values.

npm i @sap/hdi-deploy@4.8.0

or the latest version with the fix...

npm i @sap/hdi-deploy@4.8.2
mayank_thakursap
Explorer

Hi All ,

Did anyone find the solution to this issue? I am also facing the same error.

Regards:

Mayank

sriharsha_cr
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello mayank.thakursap

Try referring to this comment https://answers.sap.com/comments/13985324/view.html

It helped me resolve the deployment issue, hope it helps you as well!

Best Regards

Harsha

mayank_thakursap
Explorer
0 Kudos

Hi all, I have followed the comments and made the changes as below :

But still, I am not able to resolve the issue. Here are the logs:

Can someone help me .

Regards:

Mayank

mauriciolauffer
Product and Topic Expert
Product and Topic Expert

Meanwhile, you can downgrade to v.4.8.0 which is working fine.

ajclow
Discoverer
0 Kudos

Hi Mauricio,

We started having this issue today. We were operating with only a package.json in our root directory to keep everything as clean as we possible.

We tried just updating the @sap/hdi-deploy version to 4.8.2 in that package.json and doing the install you recommended above (npm i @sap/hdi-deploy@4.8.2), however, this did not work. The only thing that resolved the issue was creating a package.json in the db folder like yours above.

Will we need to keep this db folder package.json or is this an issue with the current version and we will be able to move back to a single package.json in the future?

Thanks,

Andrew

mauriciolauffer
Product and Topic Expert
Product and Topic Expert

Hi Andrew,

That's funny, I just had the same conversation with a colleague this morning! Somehow, people don't have a package.json in the db folder and don't know they should have.

Let me be clear here: developers must control their app dependencies, and package.json + package-lock.json is the only way (for nodejs with npm). In CAP nodejs, you must have a package.json in your db folder to have control on what is being used there.

If you don't, it'll default to the latest version of @sap/hdi-deploy. Installing it in the root package.json doesn't work because this is not used in the db-deployer application built from the db folder.

Some will say the default behaviour is a good thing. IMO, this is a flaw! It should be required, same as the root project package.json. And I hope SAP keep it separated. Using 1 package.json to build 2 different apps would be a mistake.