I am attempting to install gatsby-transformer-sharp gatsby-plugin-sharp using yarn.
Unfortunately when I try and install them the following error displays:
error /Users/david.hewitt/code/shopfront/node_modules/pngquant-bin: Command failed.
Exit code: 1
Command: node lib/install.js
Arguments:
Directory: /Users/david.hewitt/code/shopfront/node_modules/pngquant-bin
Output:
⚠ self signed certificate in certificate chain
⚠ pngquant pre-build test failed
ℹ compiling from source
✖ Error: pngquant failed to build, make sure that libpng is installed
at /Users/david.hewitt/code/shopfront/node_modules/bin-build/node_modules/execa/index.js:231:11
It's worth mentioning that this installs correctly when I am at home however, I work at a fintech where we have security in place for vpn's and such.
Is there a way of determining what certificate it is talking about and is there any way to get past this error?
Also I have tried installing libpng locally using brew and defining the certificate in my yarn config.
Usually in enterprises with corporate proxies, SSL termination is performed so you never see the third-party certificates but self-signed certificates generated on the fly by the internal infrastructure, which is probably why you get this error.
To work around this, you usually need to have an internal repository for your packages (which is useful in any case for larger organizations, for various reasons). That infrastructure then takes care of downloading/caching dependencies and avoiding issues with said proxy and certificates and to point your tools towards that package repo; there are many vendors in this space...
Alternatively, with yarn (and most similar tools), you can bypass certificate checks, but we all agree that it is a really bad idea.
With yarn, you can do this: yarn config set "strict-ssl" false
Related
I'm working on scripting the setup of our dev machines via chocolately, etc. and I've gotten it to install VS Code, but my attempts to script adding extensions end in failure.
ps> cmd /c code --install-extension ms-python.python
gives...
Installing extensions...
self signed certificate in certificate chain
Failed Installing Extensions: ms-python.python
I can, however, manage this inside of VSCode without an issue.
Any ideas on how to resolve this?
fyi: yes, I'm in a corporate environment. I believe we have a proxy server but that's the extent of my knowledge(I'm an ignorant embedded developer, unwise to the ways of the internet)
also fyi: VSCode was installed via chocolatey, if that matters.
While it doesn't directly answer the question (it appears that the CLI part of vscode does not respect proxy settings), I resolved my specific problem by downloading the .vsix files for the extensions required and put them in my configuration-as-code repo/deliverable.
code --install-extension vscode_extensions\cpptools-win32.vsix
Seems to work fine. It's a mild pain in the butt to go and download each one (there's a link available on the market place for the extension marked: 'Download Extension'), but at least I can get them installed and my users can update to the latest version after the fact.
I would need to install Memcached on a server for which I don't have root rights.
Is it (legally) possible to install it on another server (i.e. a
CentOS virtual machine) and then bring the "compiled executable" on
the original server?
If yes, how do I avoid libraries and other dependencies issues?
I would like to avoid contacting server admins if possible as this translates in high waiting times.
It is possible as long as you compile the dependencies into the memcached binary.
This implies disabling shared and building a static binary.
You can find someone having experience doing the same in this discussion:
So the relevant steps are:
got latest libevent from: http://www.monkey.org/~provos/libevent/
build libevent as follows:
(cd in libevent directory first)
a. configure --prefix=/home/hduin/ots/libevent-1.4.13-build
b. make install
in latest memcached directory:
a. configure --with-libevent=/home/hduin/ots/libevent-1.4.13-build
b. edit Makefile and add -static to LDFLAGS and -lrt to LIBS
definitions
c. make
I have created a package which I can install locally:
cinst <packageName> -source "C:\Host\<packageName>"
But when I put this package on a file server served over http from a Virtual Directory by IIS, it fails.
cinst <packageName> -source "http://server/packages/<packageName>"
The target machine can browse to the package directory in a browser, so it is able to see the server, the folder and has list and read permissions.
The error
[ERROR] - install not installed. The package was not found with the source(s) listed.
Fiddler shows the requests:
http://server/packages/<packageName>
GET /packages/<packageName>
301 redirect to http://server:port/packages/<packageName>
http://server:port/packages/<packageName>
200 with <packageName>.nuspec and .nupkg files in the response
then
GET /packages/<packageName>/$metadata
404 File or directory not found
My two thoughts:
Is it a Windows security measure stopping me
Is my package missing some metadata
I used to managing packages on *nix and I have only recently started to work in a Windows environment, so feel free to state anything obvious!
Environment:
Information.PlatformVersion='6.1.7601.65536'|
Information.PlatformName='Windows 7'|
Information.ChocolateyVersion='0.9.9.11'|
No additional pointers in the chocolatey log with the -debug set
Not using an IDE or a Repo, all just simple.
TY!
Unfortunately NuGet (and by proxy Chocolatey) does not work with bare http. It requires OData right now, although in the future the Chocolatey team plans to allow working with just http indexes.
Here's a resource explaining your options for package hosting: https://github.com/chocolatey/choco/wiki/How-To-Host-Feed
I'm having serious problems getting the last pieces of my TeamCity configuration in place.
I have a powershell step that executes the following commands:
& npm install
& grunt build
logging the following output:
Build (Powershell) (1s)
[13:18:08]PowerShell Executable: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe
[13:18:08]Working directory: C:\BuildAgent\work\6a434ee5d01fd0d9
[13:18:08]PowerShell arguments: [-NonInteractive, -ExecutionPolicy, ByPass, -File, C:\BuildAgent\temp\buildTmp\powershell8407335260182621582.ps1]
[13:18:09]Error: ENOENT, stat 'C:\Windows\system32\config\systemprofile\AppData\Roaming\npm'
[13:18:09]
[13:18:09]grunt-cli: The grunt command line interface. (v0.1.13)
[13:18:09]Process exited with code 0
I've seen that this is a known problem, but none of the solutions has worked for me so far.
My setup is the following: I have two virtual machines in Azure, build and agent. Both are connected to the same AD domain, domain, in which there is a user domain\teamcityuser, who is of "standard" class (i.e. not admin). This user runs both the build server (on the build instance) and the build agent (on the agent instance).
I've tried these things without success:
Creating the directory in the error message, making sure that domain\teamcityuser has full controll access rights to it.
Creating an npm directory under C:\Users\teamcityuser\AppData\Roaming
Creating a file C:\Windows\System32\config\SystemProfile\.npmrc with the contents prefix=C:\npm-global, as well as creating the latter folder
Running npm cache clean before running the build
Installing a global npm package through npm install -g npm
What more can I try to get this working?
And to avoid the XY problem, here's my actual problem:
I have a .NET Web API project with CI setup through this TeamCity installation, via Octopus Deploy and to the hosting server. I also have a github repo with the code for a web SPA that will consume the API. The spa is built with grunt build, after which there's a dist folder with everything I need to deploy.
I'd like to re-use as much as possible of the CI architecture to roll out the client too.
Given that path to executable contains SysWOW64, this is an x32 Powershell, therefore, it refers to x32 system profile path, which is located at C:\Windows\sysWOW64\config\systemprofile. So, you need to use that path as your base in order to implement any workarounds, say, create C:\Windows\sysWOW64\config\systemprofile\AppData\Roaming\npm folder, and not plain C:\Windows\system32\config\systemprofile\AppData\Roaming\npm.
When running the ActiveState Perm Package Manager I try and add a repository but I get the error: certificate Verify Failed. The repository is on a web site for which there is no way I can verify it's certificate. I will answer my own question in a minute because it took me forever to find the solution and I thought the community might benefit.
add the environment variable: PERL_LWP_SSL_VERIFY_HOSTNAME with a value of 0