cancel
Showing results for 
Search instead for 
Did you mean: 

name sap could not be found during create project from fiori template

jasonwangcn
Participant
0 Kudos
935

Hi all expert,

I am creating project with sap business application studio with trial account. I just create a project via follow the template. But the projects i created always show me the error 'name sap could not be found'. It is for 'sap.ui.define' from component.js.

May u know how to fix it?

0 Kudos

Hello.

This seems to be an eslint issue, not a TypeScript Signatures issue.

I believe a relevant `globals` section need to be configured in the eslint config.

- https://eslint.org/docs/user-guide/configuring#specifying-globals

Cheers.

Shahar.

Accepted Solutions (1)

Accepted Solutions (1)

yuval_morad
Advisor
Advisor

It is hard to estimate since the project structure is not available.

Is it Fiori devspace?

Is it a project for ABAP runtime or CF runtime?

In general:

1. The dependencies above is correct

2. npm install

3. Refresh App Studio

maissa93
Participant
0 Kudos

you can find the project structure in my GitHub repository.

Yes it is a Fiori devspace and it is a CF runtime.

I tried npm install then SAP BAS refreshed but did not solve the error.

Do you have any suggestions?

Thank you.

yuval_morad
Advisor
Advisor

a dummy change in tsconfig.json solved it

maissa93
Participant
0 Kudos

I run another time the command npm i and did the dummy change and then both of the errors are gone now!
thanks a lot for your help.

Answers (2)

Answers (2)

RazK
Product and Topic Expert
Product and Topic Expert

Hi jasonwangcn ,

Try to perform npm install for the project, ie (1) open a terminal [CTRL + ~]; (2) Verify that the terminal is opened in the specific project's directory (not the "projects" directory); (3) execute npm install".

Regards - Raz

maissa93
Participant
0 Kudos

Hello Raz,

I am also facing the same issue on SAP BAS and it looks like the following:

Unfortunately your suggested solution did not solve it.

Do you have an idea how it can be fixed?

Best Regards

Maissa

yuval_morad
Advisor
Advisor
0 Kudos

Please share the package.json and the template used for project creation

maissa93
Participant
0 Kudos

Hi Yuval,
Thank you for your reply.

I did not use any template, so I created all the files and wrote the code from scratch.

My package.json is the following:

{
  "name": "sapui5app1",
  "version": "0.0.1",
  "devDependencies": {
    "@sap/ui5-builder-webide-extension": "1.0.x",
    "@ui5/cli": "2.2.6",
    "eslint": "5.16.x",
    "@sap/eslint-plugin-ui5-jsdocs": "2.0.x",
    "@sapui5/ts-types": "1.71.x",
    "bestzip": "2.1.4",
    "rimraf": "3.0.2"
  },
  "ui5": {
    "dependencies": [
      "@sap/ui5-builder-webide-extension"
    ]
  }
yuval_morad
Advisor
Advisor
0 Kudos

I cloned it performed npm i on the module level and do not see any error.

I do see and error on tsconfig.json