-
Notifications
You must be signed in to change notification settings - Fork 39
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
"apex-nitro publish" deletes distribution folder and throws error #240
Comments
Strange. You provide a very good step by step explanation, so thank you for that. Would you be willing to try the latest beta? A few people (including me) have been testing it over the past few weeks. It's stable so far and we haven't had any issues with the publishing feature. If so, I'll let know you how. It's pretty simple. |
@vincentmorneau, absolutely. Let me know how to use the beta and I'll test this out again. |
Great! You just need to run this: npm i -g apex-nitro@4.1.0-beta.3 It'll override your v4.0.0 with the new v4.1.0-beta.3 and then you can try this again apex-nitro publish oracle-volunteers Let me know if you have any problem with the installation. Right now we haven't had any bug in beta.3, so it's probably going to be released as is under v4.1.0. |
Well, let me add a bug into the beta.3 release then! To insure no issues between v4 and v4.1-beta.3 I uninstalled 4.0
Then I installed the apex nitro beta
I noticed I was missing a peer dependency, so I also installed that
I then ran the dir listing, publish, and dir listing again
|
About the Now back to APEX Nitro, I'm going to have to get my hands on a Windows machine. Are you still able to use the While I sort this out, you can manually zip the |
Yeah, I can zip and upload the directory manually without an issue. As far as launch, it launches properly but I get a 404 for files that should be loading from localhost. If you want, I can do a gotomeeting and let you take control if you want to do any quick debugging without having to find and configure a windows machine. Additionally, if you get your hands on a windows machine, there is a workaround for doing a full visual studio installation. Instead, you can just first do |
If I'm able to make it work on my Windows 10 system, I'll let you know and schedule a gotomeeting. About the 404, this is a separate issue? Can you right click on those files and open in a new tab? Sometimes the browser flags them as "unsecure" and you have to add the permission once. |
Okay, I'll wait for your reply regarding the publish feature. As far as the 404 goes, if I open them up in a new tab I simply get a tomcat 404 page
|
A little more information: I went to test this on a clean windows 10 laptop I had laying around. I was confused when everything worked yesterday. This morning I got back on the laptop to see if I could figure anything out... only to figure out that it is no longer working. The laptop had not been used in a while, and I realized that it installed windows updates between the two apex-nitro tests. I haven't dug into what the updates are yet, but they are the following updates:
So I am guessing that there may be an issue with an underlying node module on updated windows machines. I am going to try rolling back these updates (hopefully one at a time) and see if I can determine the culprit with process of elimination. |
Further further update: I figured out what is causing the problem. The error had nothing to do with the windows updates. But all of the sudden apex-nitro publish was working on my original windows machine. The only thing to change was the nitro-src folder. When I changed the nitro-src folder back to its original state, the error came back. So, while I do not know why, here is the folder structure of the nitro-src folder that is causing this error:
The issue I mentioned before with apex-nitro launch not loading loacalhost files seems to have to do with the css folder as well as that is working. My current workaround is Hopefully this helps diagnose the issue! |
Ha! This helps me investigate further. Two things:
|
Good to know number 1. As far as subfolders, everything does work when just in a css directory directly. Interestingly enough, it also works as long as there are no empty sub-directories. However i don't think it does the minifying, sourcemapping, etc) when the css files are in subdirectories. This may be a good feature to consider for the future. I assume it would be easy enough to crawl the |
Okay so I was able to reproduce your issue and I understand the problem. It has everything to do with empty directories. The only file you're trying to process here is I created a separate issue here #241 to keep track of it. Now I'm thinking the dist folder should always be created, regardless if there is any file in it. It would prevent the publish feature from crashing. |
Great! Thanks for working with me on this! |
@jasonlyle88 can you try with the new beta? It should support
then again
|
Also, regarding your feedback:
I understand the value of this, but if you are to make complicated CSS structures, I would strongly advise to look at the Sass options under css languages. Using Sass, you could do this very easily. Example:
Then, in @import "app/header";
@import "app/body";
@import "app/footer"; And in @import "pages/p1";
@import "pages/p2";
@import "pages/p3"; In Sass, files prefixed with an underscore Does it make sense? |
Looks like it is working well now with both empty directories and processing sub-directories. Thanks for all this! One thing I did notice with beta.4 is that that when I run the publish command, the command line tells me that apex nitro is now launching my project, not publishing my project:
Granted, it is a small, non-functional, point, but an easy bit to polish! As far as scss, that makes perfect sense! That was actually a next step for me to look at, so thank you for a quick read to demonstrate that functionality! |
Nice catch. Thanks! |
Issue Description
When I run
apex-nitro publish oracle-volunteers
, I see the "nitro-dist" folder be deleted in explorer and receive an error that the distribution folder does not exist. Below is the command line interaction. I do a listing of the directory to show the distribution folder exists, then call the publish function, then I do a listing to show that the distribution folder has suddenly been deleted.APEX Nitro Version
4.0.0
Operating System
Windows 10
Node Version
9.4.0
Browser
Chrome v64
APEX Version
5.1.3
Project configuration screenshot
The text was updated successfully, but these errors were encountered: