Configure PC:
OS: Windows 10 Corporate 2016
Version OS: 10.0.14393 build 14393
Build OS: Multiprocessor Free
Model system: OptiPlex 5050
Type system: x64-based PC
Processor: Count Processors- 1.
[01]: Intel64 Family 6 Model 158 Stepping 9 GenuineIntel ~3408 MGz
Version BIOS: Dell Inc. 1.6.5, 09.09.2017
$ npm config list -l
; cli configs
long = true
metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/6.5.0 node/v11.1.0 win32 x64"
; userconfig C:\Users\MyName.npmrc
NODE_TLS_REJECT_UNAUTHORIZED = "0"
msvs_version = "2017"
proxy = "http://MyName:MyPass@domain:port/"
python = "python2.7"
registry = "https://registry.npmjs.org/"
strict-ssl = false
; builtin config undefined
prefix = "C:\Users\My
Name\AppData\Roaming\npm"
; default values
access = null
allow-same-version = false
also = null
always-auth = false
audit = true
audit-level = "low"
auth-type = "legacy"
bin-links = true
browser = null
ca = null
cache = "C:\Users\MyName\AppData\Roaming\npm-cache"
cache-lock-retries = 10
cache-lock-stale = 60000
cache-lock-wait = 10000
cache-max = null
cache-min = 10
cafile = undefined
cert = null
cidr = null
color = true
commit-hooks = true
depth = null
description = true
dev = false
dry-run = false
editor = "notepad.exe"
engine-strict = false
fetch-retries = 2
fetch-retry-factor = 10
fetch-retry-maxtimeout = 60000
fetch-retry-mintimeout = 10000
force = false
git = "git"
git-tag-version = true
global = false
global-style = false
globalconfig = "C:\Users\MyName\AppData\Roaming\npm\etc\npmrc"
globalignorefile = "C:\Users\MyName\AppData\Roaming\npm\etc\npmignore"
group = 0
ham-it-up = false
heading = "npm"
https-proxy = null
if-present = false
ignore-prepublish = false
ignore-scripts = false
init-author-email = ""
init-author-name = ""
init-author-url = ""
init-license = "ISC"
init-module = "C:\Users\MyName\.npm-init.js"
init-version = "1.0.0"
json = false
key = null
legacy-bundling = false
link = false
local-address = undefined
loglevel = "notice"
logs-max = 10
; long = false (overridden)
maxsockets = 50
message = "%s"
; metrics-registry = null (overridden)
node-options = null
node-version = "11.1.0"
noproxy = null
offline = false
onload-script = null
only = null
optional = true
otp = null
package-lock = true
package-lock-only = false
parseable = false
prefer-offline = false
prefer-online = false
; prefix = "C:\Program Files\nodejs" (overridden)
preid = ""
production = false
progress = true
; proxy = null (overridden)
read-only = false
rebuild-bundle = true
registry = "https://registry.npmjs.org/"
rollback = true
save = true
save-bundle = false
save-dev = false
save-exact = false
save-optional = false
save-prefix = "^"
save-prod = false
scope = ""
script-shell = null
scripts-prepend-node-path = "warn-only"
searchexclude = null
searchlimit = 20
searchopts = ""
searchstaleness = 900
send-metrics = false
shell = "C:\Windows\system32\cmd.exe"
shrinkwrap = true
sign-git-commit = false
sign-git-tag = false
sso-poll-frequency = 500
sso-type = "oauth"
; strict-ssl = true (overridden)
tag = "latest"
tag-version-prefix = "v"
timing = false
tmp = "C:\Users\MyName\AppData\Local\Temp"
umask = 0
unicode = false
unsafe-perm = true
update-notifier = true
usage = false
user = 0
; user-agent = "npm/{npm-version} node/{node-version} {platform} {arch}" (overridden)
userconfig = "C:\Users\MyName\.npmrc"
version = false
versions = false
viewer = "browser"
ERROR:
gatsby new test12w3
info Creating new site from git: https://github.com/gatsbyjs/gatsby-starter-default.git
Cloning into 'test12w3'...
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (5/5), done.
Receiving objects: 100% (1077/1077), 1.93 MiB | 780.00 KiB/s, done.eceiving objects: 99% (1067/1077), 1.92 MiB | 792.00 KiB/s
Resolving deltas: 100% (610/610), done.
success Created starter directory layout
info Installing packages...
> [email protected] install C:\project\gatsby\test12w3\node_modules\sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.7.0/libvips-8.7.0-win32-x64.tar.gz
C:\project\gatsby\test12w3\node_modules\sharp\install\libvips.js:77
throw err;
^
Error: self signed certificate in certificate chain
at TLSSocket.onConnectSecure (_tls_wrap.js:1112:34)
at TLSSocket.emit (events.js:182:13)
at TLSSocket._finishInit (_tls_wrap.js:625:8)
ALichinin@MSK-OCH-100755 C:\project\gatsby\test12w3\node_modules\sharp
$ if not defined npm_config_node_gyp (node "C:\Users\ALichinin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\ALichinin\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: self signed certificate in certificate chain
gyp ERR! stack at TLSSocket.onConnectSecure (_tls_wrap.js:1112:34)
gyp ERR! stack at TLSSocket.emit (events.js:182:13)
gyp ERR! stack at TLSSocket._finishInit (_tls_wrap.js:625:8)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ALichinin\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\project\gatsby\test12w3\node_modules\sharp
gyp ERR! node -v v11.1.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ALichinin\AppData\Roaming\npm-cache\_logs\2019-01-16T13_45_34_341Z-debug.log
e
I work through a proxy as you can see from the configuration npm, did the documentation https://www.gatsbyjs.org/docs/gatsby-on-windows did not help
Probably related to https://github.com/nodejs/node-gyp/issues/695#issuecomment-145236715
node-gyp doesn't use the npm registry, it downloads the tarball from https://nodejs.org/.
Try setting NODE_TLS_REJECT_UNAUTHORIZED=0
@sidharthachatterjee New error, OMG this damn corporate pc:
info Creating new site from git: https://github.com/gatsbyjs/gatsby-starter-default.git
Cloning into 'nihua'...
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 1077 (delta 0), reused 2 (delta 0), pack-reused 1072
Receiving objects: 100% (1077/1077), 1.93 MiB | 19.04 MiB/s, done.
Resolving deltas: 100% (610/610), done.
success Created starter directory layout
info Installing packages...
yarn install v1.5.1
[1/4] Resolving packages...
[2/4] Fetching packages...
[-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 0/1545(node:8912) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
error An unexpected error occurred: "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz: SSL Error: SELF_SIGNED_CERT_IN_CHAIN".
info If you think this is a bug, please open a bug report with the information provided in "C:\\project\\gatsby\
ihua\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
error Command failed: yarnpkg
I am getting the same error. I am on a Mac
error /Users/alex/code/ciccio/node_modules/sharp: Command failed.
Exit code: 1
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
Arguments:
Directory: /Users/alex/code/ciccio/node_modules/sharp
Output:
info sharp Using cached /Users/alex/.npm/_libvips/libvips-8.7.0-darwin-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=11.3.0 runtime=node arch=x64 platform=darwin)
internal/modules/cjs/loader.js:605
throw err;
^
Error: Cannot find module 'graceful-fs'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
at Function.Module._load (internal/modules/cjs/loader.js:529:25)
at Module.require (internal/modules/cjs/loader.js:658:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.
at Module._compile (internal/modules/cjs/loader.js:722:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
error Command failed: yarnpkg
Error: Command failed: yarnpkg
index.js:236 Promise.all.then.arr
[lib]/[gatsby-cli]/[execa]/index.js:236:11
util.js:16 tryCatcher
[lib]/[gatsby-cli]/[bluebird]/js/release/util.js:16:23
promise.js:512 Promise._settlePromiseFromHandler
[lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:512:31
promise.js:569 Promise._settlePromise
[lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:569:18
promise.js:614 Promise._settlePromise0
[lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:614:10
promise.js:694 Promise._settlePromises
[lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:694:18
promise.js:638 Promise._fulfill
[lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:638:18
promise_array.js:126 PromiseArray._resolve
[lib]/[gatsby-cli]/[bluebird]/js/release/promise_array.js:126:19
promise_array.js:144 PromiseArray._promiseFulfilled
[lib]/[gatsby-cli]/[bluebird]/js/release/promise_array.js:144:14
promise.js:574 Promise._settlePromise
[lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:574:26
promise.js:614 Promise._settlePromise0
[lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:614:10
promise.js:694 Promise._settlePromises
[lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:694:18
async.js:138 _drainQueueStep
[lib]/[gatsby-cli]/[bluebird]/js/release/async.js:138:12
async.js:131 _drainQueue
[lib]/[gatsby-cli]/[bluebird]/js/release/async.js:131:9
async.js:147 Async._drainQueues
[lib]/[gatsby-cli]/[bluebird]/js/release/async.js:147:5
async.js:17 Immediate.Async.drainQueues [as _onImmediate]
[lib]/[gatsby-cli]/[bluebird]/js/release/async.js:17:14
@AlexLich It looks like the first instance was using npm and the second is using yarn
Can you uninstall yarn and try again? (Gatsby prefers yarn if it is in your path)
Can you uninstall
yarnand try again? (Gatsby prefers yarn if it is in your path)
Yes yarn has been installed, It seems the case in the corporate antivirus, the firewall is turned off, but still the antivirus does some dark things
Could you try to run this on a pc without the corporate firewalls/antiviruses? To see if it works. It seems like an issue with downloading packages & installing.
I'm going to close this one because it looks more or less like a duplicate of https://github.com/gatsbyjs/gatsby/issues/11026 please move the discussion to that thread.
Thank you for understanding.
https://github.com/gatsbyjs/gatsby/issues/11026#issuecomment-568963285
you should download the libvips tar package manually, then put it into a folder named “_libvips”, which you should found it in global cache folder. Then you can try another install ,and it works!
Most helpful comment
https://github.com/gatsbyjs/gatsby/issues/11026#issuecomment-568963285
you should download the libvips tar package manually, then put it into a folder named “_libvips”, which you should found it in global cache folder. Then you can try another install ,and it works!