Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There are two exceptions in OrchardCore.Commerce 2.0 while building project : ArgumentException: Illegal characters in path (OCC-230) #422

Closed
effapp opened this issue Apr 10, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@effapp
Copy link

effapp commented Apr 10, 2024

Describe the bug

There are two exceptions in OrchardCore.Commerce 2.0 while building project : ArgumentException: Illegal characters in path

To Reproduce

Steps to reproduce the behavior:

  1. Clone OrchardCore.Commerce 2.0 repository
  2. Right click on 'OrchardCore.Commerce.Web' project and click on 'Build' menu in pop menus
  3. Display ArgumentException: Illegal characters in path in console window
    image

5.Right click on package.json of OrchardCore.Commerce.Web and click on 'Task runner explorer' menu of pop menus
6.Double click on build of ask runner explorer and dispaly error:
npm ERR! explore It doesn't look like nodejs-extensions is installed. As follow figure:

image

Screenshots

Project dependencies window display error: NPM->VisibilityMarker

image

Jira issue

@effapp effapp added the bug Something isn't working label Apr 10, 2024
@github-actions github-actions bot changed the title There are two exceptions in OrchardCore.Commerce 2.0 while building project : ArgumentException: Illegal characters in path There are two exceptions in OrchardCore.Commerce 2.0 while building project : ArgumentException: Illegal characters in path (OCC-230) Apr 10, 2024
@sarahelsaig
Copy link
Contributor

Hi, I've checked out a fresh copy at the v2.0.0 tag and opened it in Visual Studio 2022 (Version 17.9.4). The build goes through without errors. I do see this VisibilityMarker} in VS though. I will investigate because I don't remember it from before.
image

Regarding steps 5-6, that's expected. The project uses Lombiq.NodeJs.Extensions which does some under-the-hood setup steps during compilation and standalone (p)npm build won't work until those are set up. I think it didn't reach them in your case, because you can see in the task runner explorer (4th line) It doesn't look like nodejs-extensions is installed.

@effapp
Copy link
Author

effapp commented Apr 10, 2024

Hi @sarahelsaig ,
There is a garbled code of path in output window:

�[?25l�[36m?�[39m �[1mThe modules directory at "F:\tests\oc\OrchardCore.Commerce\src\Modules\OrchardCore.Commerce.ContentFields\node_modules.nx\node_modules" will be removed and reinstalled from scratch. Proceed?�[22m �[2m(Y/n)�[22m

image

@sarahelsaig
Copy link
Contributor

I've looked into this src/OrchardCore.Commerce.Web/package.json file and I don't think we even need it any more. All the other files added in the same commit have since been deleted. Could you delete it and see it that fixes your issue?

There is a garbled code of path in output window

I don't think that's a problem, it just looks weird because the VS console can't understand terminal escape sequences.

@effapp
Copy link
Author

effapp commented Apr 11, 2024

I've looked into this src/OrchardCore.Commerce.Web/package.json file and I don't think we even need it any more. All the other files added in the same commit have since been deleted. Could you delete it and see it that fixes your issue?

There is a garbled code of path in output window

I don't think that's a problem, it just looks weird because the VS console can't understand terminal escape sequences.

Hi @sarahelsaig ,
I have deleted src/OrchardCore.Commerce.Web/package.json file,but errors are same.

Currently there are three exceptions of 'ArgumentException: Illegal characters in path' respectively in OrchardCore.Commerce.ContentFields,OrchardCore.Commerce.Payment.Stripe,OrchardCore.Commerce. as follow figure:

image

I opened it in Visual Studio Enterprise 2022(Version 17.9.2)

@sarahelsaig
Copy link
Contributor

It's not clear what's going on. Could you attach the whole build log? Using the structured binlog format would be best, see here.

@effapp
Copy link
Author

effapp commented Apr 11, 2024

It's not clear what's going on. Could you attach the whole build log? Using the structured binlog format would be best, see here.

Hi @sarahelsaig ,

The above exceptions are completely absent when I use following method to generate binlog format logs

SET MSBUILDDEBUGENGINE=1
SET MSBUILDDEBUGPATH=d:\MSBuildReproLogs
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.exe" OrchardCore.Commerce.sln

Why?

@effapp effapp closed this as completed Apr 12, 2024
@sarahelsaig
Copy link
Contributor

Unfortunately I'm not sure since I could never reproduce it on my end. It may be the case of Visual Studio being weird. The compiler in VS behaves slightly differently form using the CLI tools from .NET SDK, although in the past this only caused warnings for me, never a full build error. Perhaps this MSBUILDDEBUGENGINE flag forced it to use the SDK's MSBuild.exe under the hood.

In general our tagged releases are guaranteed to succeffully build using the dotnet CLI, because that's what the script uses under the hood for publication. Even if you have no success with VS, this should always work:

dotnet restore
dotnet build OrchardCore.Commerce.sln

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants