-
Notifications
You must be signed in to change notification settings - Fork 58
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
Compiling error trying to follow the "Orchard-Training-Demo-Module" (OSOE-778) #126
Comments
I'm sorry to hear that, thanks for the detailed bug report though. Please share the build output (under the Output window in VS), since that'll provide details, the Error List only shows the end result. Thanks for the suggestion! Primarily due to how Node build pipelines work, we'll need that kind of documentation. If we were to merge it into one, then we'd need to either maintain the same docs in multiple places, or have the same amount of links, just in different directions. We'll see if we can simplify this, but what we have as of now is what seems to be the minimum already. |
@Piedone thank you for your reply. I can imagine it's not easy to maintain the documentation in a single file. It's better to follow the principle of single responsibility here too 😊. Yes, perhaps simplifying it or adding a video that describes how to install the "Open-Source-Orchard-Core-Extensions" in a clean environment could be sufficient. Here you can find my VS output: OrchardCore-LearningPath_Output-results.txt. Thank you |
This is the error at the bottom of the whole thing:
I.e,, with DeepL:
I was running Node v18.13.0 but switched to v20.11.0 for testing this and it still works. So, that's not the issue. It seems that VS can't find find Node on your machine, see https://stackoverflow.com/questions/49729401/release-of-asp-net-core-app-the-command-npm-install-exited-with-code-9009. Perhaps this can help. Did you also do this? Did you set up Node with NVM? |
@Piedone thank you for your reply. Yes, I also followed the instructions in this guide. I followed the initial steps and then, as suggested, proceeded directly to the "Additional Configuration" section. I also restarted my PC. I installed Node via it's installer, the x64 .msi as suggested in the "Recommended setup". Now, I'll start looking for a solution, beginning with the link you provided. Here are a few screenshots: I enabled long paths by running "regedit" as an admin, because I'm a standard user on my PC: I added NodeJs as external tools. On my PC, the path name for NodeJs is in lowercase. However, I've noticed there's no difference when it's written in Pascal Case: Here's my "nodejs" folder (in lowercase): I successfully installed the Visual Studio NPM Task Runner extension: |
I have fixed the "pnpm" error, but now I have a new error that I will describe here. To fix the "pnpm" error, I first checked via VS "Package Manager Console" if the pnpm was installed. I ran the command
So, I first cheked if "npm" was available as command, to be sure that the NodeJs path we set in the "External Web Tools" was working, and it was:
I installed pnpm with the command
and then I checked the version to be sure that it was installed:
I opened the Orchard solution and cleaned it, and rebuilt it. After 1 minute, VS displayed an error on top of the window, but the compiler was running, so I was happy 😁.
The same error in VS: After a while, it finished to compiling, but with errors 😟. I checked the output panel (here is the entire output file "OrchardCore-Roslyn_error.txt") and the first FAIL was here:
So I cheked if this path exists I will investigate more to understand why. Maybe is something related to the error that VS showed me (this is strange: "The fully qualified file name must be less than 260 characters", is it something related to "regedit" and admin permission? 🤔), or maybe is because this file was compiled yesterday? Maybe is better if I delete the entire "Debug" folder to force a new compile. The path |
I deleted all the Now, I have 2 rebuilds failing (previously it was 3) and 87 succeeding, which is the same as before. There are additional failures (related to NodeJs clean process), but Visual Studio isn't displaying any errors. Here's the output file: OrchardCore-Errors_after_deleting_bin_obj_in_NodeJsExtensions.txt (search for "FAILED" and "failed"). Here an image showing the folders under |
I tried starting the web project and could see the "Setup" page. But when I click "Finish Setup", nothing happens. I even tried cloning the branch again, in a new folder, but I got the same result 😟. NOTE that compiling the code in the new folder, I got 3 projects fail and again the error about 260 characters 🤔: Here the results from the output panel of the "new folder" OrchardCore-New-Folder_Output.txt, and the errors panel OrchardCore-New-Folder_Errors.txt. The "Setup" page: |
To be clear, the configuration we recommend, and what's written in the docs as well, is NVM, not direct installation. NVM makes sure that your Node is usable in all ways, which may not necessarily be the case otherwise. So I recommend doing that, because anything else can be a can of worms. You shouldn't have to install PNPM manually, that's enabled by Node.js Extensions automatically. Do you run VS as admin? If not, that might cause part of this issue too. The 260 character limit is a Windows limitations that's supposed to be fixed by enabling long paths, which you said you did. The "... exceeds the OS max path limit. The fully qualified file name must be less than 260 characters." is quite a clear indication of this being an issue. Unfortunately, I can't really help any more with that than what this documentation page says. I suggest you check whether otherwise paths longer than 260 characters work for you under Windows; if not, then there's a wider issue here. |
@Piedone thank you for your suggestions.
I will try to go forward, and I will keep this issue updated. |
I'll clarify the docs, thanks. Yes, I use Windows 11. |
Finally, I was able to run the Open-Source-Orchard-Core-Extensions 🥳 I installed Node.js using NVM and set up the "long paths" as explained in the Additional Configuration. However, it was necessary to reboot the computer for the changes to take effect. What I noticed is that the first run of I will suggest some improvements to the README with a pull request where I noticed unclear steps. Thank you, @Piedone, for your support! |
Great then! Thank you, I'll review your PRs. |
Hi Everyone,
I'm new to Orchard Core, and after watching the Dojo Course 3 on YouTube, I started exploring the code, trying to set up this solution.
Here's what I did:
1.1 Completed the prerequisites in this way:
1.1.1 Followed these instructions to install Node.js on Windows using the installer and following the "Additional Configuration" specified here (like enabling long paths, etc.);
1.1.2 Went back to the prerequisites and installed "PowerShell 7".
1.1.3 Since I used a GUI to clone the repo, I didn't initialize the submodules, because the folder was already there (after cloning the branch);
Lombiq.OSOCE.Web
;Can anyone help me?
Also, I'd like to provide feedback as suggested in Dojo Course 3. I feel that the process to install the "Orchard-Training-Demo-Module" that is "Open-Source-Orchard-Core-Extensions" locally, is too fragmented. As a new Orchard Core user, I found it confusing to jump around various readmes and follow parts of guides on different topics. A single, comprehensive guide in one place would be much more helpful for following the steps systematically.
Thank you
My dev environment:
Jira issue
The text was updated successfully, but these errors were encountered: