cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Business Application Studio: The "path" argument must be of type string

former_member185234
Active Participant
2,677

Hello,

Can't import project to SAP Business Application Studio anymore, it started from today, getting an exception:

name: TypeError message: The "path" argument must be of type string. Received undefined stack: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined at new NodeError (internal/errors.js:322:7) at validateString (internal/validators.js:124:11) at Object.join (path.js:1148:7) at t.ImportProject.getTargetFolder (/tmp/vscode-unpacked/vscode-wing-welcome-screen-1.1.1.vsix/extension/dist/extension.js:2:422894) at t.ImportProject.doUnzip (/tmp/vscode-unpacked/vscode-wing-welcome-screen-1.1.1.vsix/extension/dist/extension.js:2:421785) at t.ImportProject.import (/tmp/vscode-unpacked/vscode-wing-welcome-screen-1.1.1.vsix/extension/dist/extension.js:2:420749) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async A (/tmp/vscode-unpacked/vscode-wing-welcome-screen-1.1.1.vsix/extension/dist/extension.js:2:513131) string: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined

The same project was imported successfully before, so something happened at weekend.

I have found such warning when Workspace is created:

Problems loading reference 'vscode://schemas/workspaceConfig': Unable to load schema from 'vscode://schemas/workspaceConfig': A resource provider for 'vscode://schemas/workspaceConfig' is not registered.

So it is definitely related somehow to vscode!

Any ideas how it can be resolved?

Regards,

Oksana

NadiaAccSap
Explorer

Hi, i have the same issue from today, it seems to be related to VScode,

can anybody help us?

Regards,

Nadia

TK2
Explorer
0 Kudos

seem's link an local VS -depl issue

Abd_Am_K
Advisor
Advisor

Hi Oksana,

I am also facing the same issue while trying to setup a Marketing Hana Schema deployed to develop a custom scenario. When I try to import the Zip file, I get this error.

Br,

0 Kudos

Hi Oksana,

Did you find any solution for this ?
I am also facing the same issue from last 2 days while importing a project in BAS -> name: TypeError message: The "path" argument must be of type string.

The same file was exported previously to BAS. It was working.

Best Regards.

Arijeet

former_member185234
Active Participant

Hi, still have the same issue, already three days and still not fixed. 😞

jcisaza
Discoverer
0 Kudos

Hi, I have the same issue, while importing a project in BAS generate notification "name: TypeError message: The "path" argument must be of type string".

Best Regards,

Juan

0 Kudos

Hi everyone, this week I started facing the same problem. Please, if anyone has solved it, share it.

panda_tom
Explorer

hi I also facing the problem.but i reslove it.

Please do not use the import function button provided on the welcome screen。

you can import Project like below. it well success.

0 Kudos

Hi Jason,

Thanks for your help. Can you please elaborate the exact steps because I am not getting that option in mine BAS.

Thanks & Regards.

Arijeet

former_member185234
Active Participant
0 Kudos

Hi,

I also don't have Import option from File menu. 😞 So it is not a solution for us.

Regards,

Oksana

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert

Hi oksana.zubchenko, Hi arijeet87,

You don't have the import project menu under the file menu in BAS. You can access this menu either via command pallet (CTRL+SHIFT+P) --> Import:

Or via project explorer's context menu:

NOTE: You won't have that pop-up context menu if you have no opened projects. On that case, you should use the command palette.

Best regards,
Ivan

former_member185234
Active Participant
0 Kudos

Hi Ivan,

It helped! Thanks a lot! Hurray!

Regards,

Oksana

Accepted Solutions (0)

Answers (2)

Answers (2)

Joseph_BERTHE
Active Contributor
0 Kudos

Hello,

In my case, I had this issue, and I have corrected it by adding in the package.json file this ligne :

"sapux": true

Regards

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi oksana.zubchenko,

I've recently created a new workspace and imported a project in zip format without any issues. Here is the repo I've downloaded as zip file and was imported into my BAS:

https://github.com/ivanmir/cpapp

See if you are able to import it the same way I did. If you are able to do so, then I suspect the error was related to some limitation on the file size you are trying to import. It could be that SAP has imposed an upload limit and that may "break" the file upload - causing the error: "The "path" argument must be of type string. Received undefined"

IMHO: Importing BAS projects works best via GIT instead whole projects. It does this job better because whole zipped projects may contain all dependencies and libraries (especially from node projects) - which makes them really huge to upload.

Whereas cloning a git repo usually uses a gitignore file to prevent such huge folders and files from being uploaded into the remote repository in the first place. Thus, you can safely import it into your BAS workspace without such issues.

Otherwise, could you please clarify which procedure are you using and which project files are you importing?

Best regards,
Ivan

former_member185234
Active Participant
0 Kudos

Hi Ivan,

I have downloaded as a zip file from https://github.com/ivanmir/cpapp and tried to import to BAS - the same error as before "The "path" argument must be of type string. Received undefined stack: TypeError [ERR_INVALID_ARG_TYPE]" .

I have BAS in Trial account and something changed recently, so I can't import projects anymore.

Import from GIT is an option now.

Regards,

Oksana

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi oksana.zubchenko,

I really don't understand why git is not an option as it is widely used for source control and software lifecycle.

Regardless of tool preference, I was able to import zip projects on both BAS accounts I have access to: trial and production.

What is the exact procedure you are taking to import the project in BAS?

I would also make sure the ZIP file is not corrupted from your PC.

Another way of uploading a zip project and extracting it into BAS is by placing the file on an FTP site and use linux command line tools to get and unzip the file like so:

# cd /home/user/projects
# curl -LO https://github.com/SAP-samples/btp-full-stack-typescript-app/archive/refs/heads/main.zip # unzip main.zip

Once unzipped, you can go into the file menu and open that particular project (Open Workspace... CTRL+ALT+W)

Best regards,
Ivan