-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Gulp - Unable to cache a config file for v8flags #22
Comments
This is a permission error. It looks like the HOME environment variable is set to system32\config, and the user probably doesn't have permission to write to there. |
I dont see the home variable is set on server. what can be other issues? |
Open the node REPL with
And reply with the output. |
The strange thing is, this works with command prompt, but not when I run a command prompt using C#. Here is the output:
|
Oh sorry, try: console.log(process.env.USERPROFILE);
console.log(process.env.HOMEPATH);
console.log(process.env.HOMEDRIVE);
console.log(process.env.HOME); |
Here you go:
|
The variables seem to be fine in the CLI. Does this "C# template" change users? You could try putting the commands I listed in a .js file, and then run it through the template to see what it outputs. |
I am not very sure how can i do this as we have a class library project. However looking at the code it does not change the users. |
Well, it's doing something with the environment variables. If you can do this in the code, try setting the environment variable HOME to a place where the config file can be written before gulp is run. |
I came across this line of code : string user = System.Security.Principal.WindowsIdentity.GetCurrent().Name; and it returns "NT AUTHORITY\NETWORK SERVICE". This might be the issue? |
Yes that's probably the issue. Is there a way to change the user to what it should be? |
Thats indeed the issue. As a workaround I manually gave read/write permissions to 'Network Service' user on directory 'C:\Windows\system32\config'. I understand this shall not be a permanent solution. All tridion templates run via impersonated user 'Network Service' hence it will be difficult for us to change that. Is there any way the 'C:\Windows\system32\config' directory can be replaced by another one? |
Yes, you can set the |
Thanks Oden. Sorry, but I am new to this gulp and all. Could you please advise how can I set this variable? |
Yes, the environment variables of the server. Though, the template may override it. |
I added Something like this to System Variables: But this isn't working. I dont think the template overrides either..... |
FFS. Our builds suddenly failed because of that cryptic .cache error. Simply created folder myself and it worked. Why does it not create that folder itself? Now why change this in minor version (that is not locked in gulp for some stupid reason)? |
@artyfarty Sorry for the regression. I'll release a patch that reverts this. @phated What do you think about just throwing an annoying warning in gulp if this file can't be cached, and allowing it to just run anyway? For CI servers (where this seems to be the most error prone) the performance hit of having to invoke node to get the v8 flag listing should be meaningless. |
@tkellen 👍 on that idea. any way to bubble that up to a liftoff event so gulp can format the warning nicely? |
Hello....any update on this one....affecting now on another server :( |
@huston8 all of us are busy currently with work and other life things, sorry. If you can, please send a patch. |
I wonder how can a collaborator give such "contribution". PHATED, instead of loosing your time writing this crap please use it to cooperate. Any patch available or new release in a near future? This is the output: /home/virtual/com/htdocs/drag-drop/create-mail.php on line 16 |
@raffus PRs welcome |
? |
👍 This issue hits me whenever I try to build with |
+1 Just hit this issue trying to deploy on OpenShift |
@banerjs Just pushed 2.0.11 which should allow you to deploy. Can you see if this fixes your problem? |
Although I am now using Heroku in order to have more flexibility with my node versions (packages can sometimes be so finicky!), I just pushed to OpenShift and can confirm that I no longer see the permissions issue that caused me to post here a few days ago. Thanks! |
Awesome, closing this issue. |
Hi, I came across the error as following:
.v8flags.4.6.85.31.prod\svc-zhu.uca.bld.json is not a valid name in Windows so it fails to create the config file. Just let you know that I am running TFS 2015 build servers...And I trigger my build remotely. I guess that is why the username turns out prod\svc-zhu.uca.bld instead of svc-zhu.uca.bld. ("prod" is the domain name) Can someone help me out of this? |
Whatcha think about md5 hashing the username @phated? |
@tkellen I'd be fine with that, I think |
@tkellen does that break current installs? |
It wouldn't break current installs, it would just regen the temp file on the next run. |
@tkellen Sorry to be rude but any plans to make the change? |
@victorguo all of us are completely booked. feel free to submit a PR and we can try to find time to review it. |
Hello,
I am using a CMS to publish Gulp+less files. The gulp needs to run locally on the CMS server (.\node_modules.bin\gulp). This works fine if I run via a command prompt by navigating to \node_modules.bin. Please note that Gulp is not installed globally on server.
However when I am trying to run gulp with help of C# template (CMD + arguements = "/c CD node_modules/.bin/ & gulp") I get the below error.
Engine: Error in Engine.Transform
Engine: Error in Engine.Transform
D:\t20150611182707811\node_modules\gulp\node_modules\liftoff\index.js:182
throw err;
^
Error: EPERM, open 'C:\Windows\system32\config\systemprofile.v8flags.3.28.73.W655$.json'
Unable to cache a config file for v8flags to a your home directory
or a temporary folder. To fix this problem, please correct your
environment by setting HOME=/path/to/home or TEMP=/path/to/temp.
NOTE: the user running this must be able to access provided path.
If all else fails, please open an issue here:
http://github.com/tkellen/js-v8flags
Unable to cache a config file for v8flags to a your home directory
or a temporary folder. To fix this problem, please correct your
environment by setting HOME=/path/to/home or TEMP=/path/to/temp.
NOTE: the user running this must be able to access provided path.
If all else fails, please open an issue here:
http://github.com/tkellen/js-v8flags
at Error (native)
Liftoff Version is v2.1.0:
The text was updated successfully, but these errors were encountered: