-
Notifications
You must be signed in to change notification settings - Fork 653
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
WebJobs with Node (and node modules) #987
Comments
How long is your longest npm path? We copy it into a temp folder that looks like |
I can find one that gets to 175. But I also tried moving each sub module into the topmost node_modules folder and that didn't appear to help.... I'm interested in trying to user the WEBROOT_PATH to access modules in the root directory and not even zip or send node_modules for the job. Can you advise on how to use that environment variable in a require statement? |
If the issue cannot be explained based on the size of your path, then we need to investigate why it is happening. Can you please share a repro? You can remove all your personal job files (if they're sensitive), and replace it with some dummy job. As long as it uses the same packages, it should repro. |
Sure! Here is the job but I removed the node_modules for size, so you will need to install. Let me know if you would rather me include them. |
Deepest path I see in there is:
which is 190 long. So you're right at the point where you will hit this if your site and job name are each longer than 7 or 8 chars. |
Ok so I wrote a script to go through all modules, down the hierarchy and pull out dependencies so that I can put them in my root package.json file. Now I'm getting one for disk space (I delete each job when it breaks, so I only have one loaded at a time). Zip file is 20MBs. Looks like I have filled up the folder you told me about: Should I open a new issue? |
We can just continue here. Can you share the repro zip for this new test case? How big are the unzipped files? Normally, there is a 200MB quota for such temp files, though some of it is likely already taken by something else. |
It's more or less the same except almost all the node modules are in the top folder. It's around 45MBs unzipped. Dropbox link below:
|
When I tried I got a different error:
This means it successfully copied the files over, but then got into some runtime error (most likely unrelated). My guess is that there was some random files left in TMP from your previous attempts. Could you restart the site and try again? That should cause it to get a fresh empty TMP folder. Note that for Standard site, the TMP limit is much higher. |
Please reactive if you are still seeing this and would like to move investigation forward. |
I am bringing in all my NPM dependencies but it seems that makes the file paths too long.
Such as this is the error log. I even went into each node_module to bring their deeper node_modules into the topmost folder... and that didn't seem to work. I'd like to check that it's not because I'm compressing the files on a macintosh... I see some left overs in VS online indicating that azure puts node modules in a temp file and then converts them.
The text was updated successfully, but these errors were encountered: