electron / forge

:electron: A complete tool for building and publishing Electron applications
https://electronforge.io
MIT License
6.41k stars 506 forks source link

init failed to install via NPM 5.x on Windows (EPERM) #347

Closed Wonderer0 closed 6 years ago

Wonderer0 commented 6 years ago

Please describe your issue: Trying to create my first electron project (as given in the React + TypeScript sample) using a newly installed electon-forge failed to install babel modules. During a second attempt it failed to install react modules. During a third attempt it failed with the babel modules again.

*Console output when you run electron-forge with the environment variable `DEBUG=electron-forge:`. (Instructions on how to do so here). Please include the stack trace if one exists.**

D:\Docs\Scripts\JS>electron-forge init test_1 --template=react-typescript
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Checking your system +0ms
  electron-forge:lifecycle Process Succeeded: Checking your system +1s
  electron-forge:runtime-config setting key: verbose to value: false +0ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:init Initializing in: D:\Docs\Scripts\JS\test_1 +0ms
  electron-forge:lifecycle Process Started: Initializing Project Directory +0ms
  electron-forge:init:directory creating directory: D:\Docs\Scripts\JS\test_1 +0ms
  electron-forge:init:directory found 7 files in the directory.  warning the user +5ms
  electron-forge:lifecycle Process Stopped: Initializing Project Directory +8ms
? WARNING: The specified path: "D:\Docs\Scripts\JS\test_1" is not empty, do you wish to continue? Yes
  electron-forge:lifecycle Process Succeeded: Initializing Project Directory +6s
  electron-forge:lifecycle Process Started: Initializing Git Repository +3ms
  electron-forge:init:git .git directory already exists, skipping git initialization +0ms
  electron-forge:lifecycle Process Succeeded: Initializing Git Repository +4ms
  electron-forge:lifecycle Process Started: Copying Starter Files +2ms
  electron-forge:init:starter-files creating directory: D:\Docs\Scripts\JS\test_1\src +0ms
  electron-forge:init:starter-files copying "D:\Apps\Roaming\npm\node_modules\electron-forge\tmpl\_gitignore" --> "D:\Docs\Scripts\JS\test_1\.gitignore" +2ms
  electron-forge:init:starter-files copying "D:\Apps\Roaming\npm\node_modules\electron-forge\tmpl\_compilerc" --> "D:\Docs\Scripts\JS\test_1\.compilerc" +14ms
  electron-forge:init:starter-files copying "D:\Apps\Roaming\npm\node_modules\electron-forge\tmpl\index.js" --> "D:\Docs\Scripts\JS\test_1\src\index.js" +5ms
  electron-forge:init:starter-files copying "D:\Apps\Roaming\npm\node_modules\electron-forge\tmpl\index.html" --> "D:\Docs\Scripts\JS\test_1\src\index.html" +4m
s
  electron-forge:lifecycle Process Succeeded: Copying Starter Files +33ms
  electron-forge:lifecycle Process Started: Initializing NPM Module +3ms
  electron-forge:init:npm writing package.json to: D:\Docs\Scripts\JS\test_1 +0ms
  electron-forge:lifecycle Process Succeeded: Initializing NPM Module +68ms
  electron-forge:lifecycle Process Started: Installing NPM Dependencies +1ms
  electron-forge:init:npm installing dependencies +6ms
  electron-forge:dependency-installer installing ["electron-compile","electron-squirrel-startup"] in: D:\Docs\Scripts\JS\test_1 dev=false,exact=false,withYarn=f
alse +0ms
  electron-forge:dependency-installer executing ["install","electron-compile","electron-squirrel-startup","--save"] in: D:\Docs\Scripts\JS\test_1 +4ms
  electron-forge:runtime-config fetching key verbose +0ms
  electron-forge:init:npm installing devDependencies +8s
  electron-forge:dependency-installer installing ["babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator","electron-forge"] in: D:\D
ocs\Scripts\JS\test_1 dev=true,exact=false,withYarn=false +8s
  electron-forge:dependency-installer executing ["install","babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator","electron-forge",
"--save-dev"] in: D:\Docs\Scripts\JS\test_1 +3ms
  electron-forge:runtime-config fetching key verbose +8s
  electron-forge:lifecycle Process Failed: Installing NPM Dependencies +44s

An unhandled error has occurred inside Forge:
Failed to install modules: ["babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator","electron-forge"]

With output: Exited with status 4294963248
Error: Failed to install modules: ["babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator","electron-forge"]

With output: Exited with status 4294963248
    at _callee$ (D:\Apps\Roaming\npm\node_modules\electron-forge\dist\util\install-dependencies.js:81:19)
    at tryCatch (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\regenerator-runtime\runtime.js:65:40)
    at Generator.invoke [as _invoke] (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\regenerator-runtime\runtime.js:299:22)
    at Generator.prototype.(anonymous function) [as throw] (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\regenerator-runtime\runtime.js:117:21)
    at Generator.tryCatcher (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\util.js:16:23)
    at PromiseSpawn._promiseRejected (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\generators.js:107:10)
    at Promise._settlePromise (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\promise.js:576:26)
    at Promise._settlePromise0 (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\promise.js:614:10)
    at Promise._settlePromises (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\promise.js:689:18)
    at Async._drainQueue (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\async.js:133:16)
    at Async._drainQueues (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\async.js:143:10)
    at Immediate.Async.drainQueues (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\async.js:17:14)
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)

What command line arguments are you passing?

init test_1 --template=react-typescript

What does your config.forge data in package.json look like?

"forge": {
    "make_targets": {
    "win32": [
        "squirrel"
    ],
    "darwin": [
        "zip"
    ],
    "linux": [
        "deb",
        "rpm"
    ]
    },
    "electronPackagerConfig": {
    "packageManager": "npm"
    },
    "electronWinstallerConfig": {
    "name": "test_1"
    },
    "electronInstallerDebian": {},
    "electronInstallerRedhat": {},
    "github_repository": {
    "owner": "",
    "name": ""
    },
    "windowsStoreConfig": {
    "packageName": "",
    "name": "test_1"
    }
}

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to reproduce your problem. Using electron-forge init is a good starting point, if that is not the source of your problem. Run: electron-forge init test_1 --template=react-typescript

Environment Using latest versions of node (v8.2.1) and npm (5.5.1) in an up to date Windows 7 Pro.

N.B. npm install -g electron-forge had given serveral WARN deprecated warnings, and about skipping optional dependencies, but seemed to have installed OK, ending:

+ electron-forge@4.1.2
added 599 packages in 57.485s
MarshallOfSound commented 6 years ago

@Wonderer0 Can you run DEBUG=electron-forge* electron-forge --verbose init test_1 --template=react-typescript and post the output here

Wonderer0 commented 6 years ago

Verbose output as requested:

D:\Docs\Scripts\JS>electron-forge --verbose init test_1 --template=react-typescript
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Checking your system +0ms
  electron-forge:lifecycle Process Succeeded: Checking your system +1s
  electron-forge:runtime-config setting key: verbose to value: true +0ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:init Initializing in: D:\Docs\Scripts\JS\test_1 +0ms
  electron-forge:lifecycle Process Started: Initializing Project Directory +0ms
  electron-forge:init:directory creating directory: D:\Docs\Scripts\JS\test_1 +0ms
  electron-forge:init:directory found 7 files in the directory.  warning the user +5ms
  electron-forge:lifecycle Process Stopped: Initializing Project Directory +7ms
? WARNING: The specified path: "D:\Docs\Scripts\JS\test_1" is not empty, do you wish to continue? Yes
  electron-forge:lifecycle Process Succeeded: Initializing Project Directory +15s
  electron-forge:lifecycle Process Started: Initializing Git Repository +5ms
  electron-forge:init:git .git directory already exists, skipping git initialization +0ms
  electron-forge:lifecycle Process Succeeded: Initializing Git Repository +13ms
  electron-forge:lifecycle Process Started: Copying Starter Files +5ms
  electron-forge:init:starter-files creating directory: D:\Docs\Scripts\JS\test_1\src +0ms
  electron-forge:init:starter-files copying "D:\Apps\Roaming\npm\node_modules\electron-forge\tmpl\_gitignore" --> "D:\Docs\Scripts\JS\test_1\.gitignore" +9ms
  electron-forge:init:starter-files copying "D:\Apps\Roaming\npm\node_modules\electron-forge\tmpl\_compilerc" --> "D:\Docs\Scripts\JS\test_1\.compilerc" +26ms
  electron-forge:init:starter-files copying "D:\Apps\Roaming\npm\node_modules\electron-forge\tmpl\index.js" --> "D:\Docs\Scripts\JS\test_1\src\index.js" +4ms
  electron-forge:init:starter-files copying "D:\Apps\Roaming\npm\node_modules\electron-forge\tmpl\index.html" --> "D:\Docs\Scripts\JS\test_1\src\index.html" +3m
s
  electron-forge:lifecycle Process Succeeded: Copying Starter Files +49ms
  electron-forge:lifecycle Process Started: Initializing NPM Module +2ms
  electron-forge:init:npm writing package.json to: D:\Docs\Scripts\JS\test_1 +0ms
  electron-forge:lifecycle Process Succeeded: Initializing NPM Module +59ms
  electron-forge:lifecycle Process Started: Installing NPM Dependencies +1ms
  electron-forge:init:npm installing dependencies +6ms
  electron-forge:dependency-installer installing ["electron-compile","electron-squirrel-startup"] in: D:\Docs\Scripts\JS\test_1 dev=false,exact=false,withYarn=f
alse +0ms
  electron-forge:dependency-installer executing ["install","electron-compile","electron-squirrel-startup","--save"] in: D:\Docs\Scripts\JS\test_1 +3ms
  electron-forge:runtime-config fetching key verbose +0ms
npm WARN test_1@1.0.0 No repository field.

+ electron-squirrel-startup@1.0.0
+ electron-compile@6.4.2
removed 502 packages and updated 2 packages in 8.484s
  electron-forge:init:npm installing devDependencies +10s
  electron-forge:dependency-installer installing ["babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator","electron-forge"] in: D:\D
ocs\Scripts\JS\test_1 dev=true,exact=false,withYarn=false +10s
  electron-forge:dependency-installer executing ["install","babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator","electron-forge",
"--save-dev"] in: D:\Docs\Scripts\JS\test_1 +3ms
  electron-forge:runtime-config fetching key verbose +10s
npm WARN deprecated safe-to-string-x@2.0.3: Moved to https://github.com/Xotic750/to-string-symbols-supported-x
npm WARN deprecated wrench@1.5.9: wrench.js is deprecated! You should check out fs-extra (https://github.com/jprichardson/node-fs-extra) for any operations you
were using wrench for. Thanks for all the usage over the years.
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

> electron-forge@4.1.2 install D:\Docs\Scripts\JS\test_1\node_modules\electron-forge
> node tabtab-install.js

> spawn-sync@1.0.15 postinstall D:\Docs\Scripts\JS\test_1\node_modules\spawn-sync
> node postinstall

npm WARN test_1@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron-installer-redhat@0.5.0 (node_modules\electron-installer-redhat):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for electron-installer-redhat@0.5.0: wanted {"os":"darwin,linux","arch":"any"} (current: {"os
":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron-installer-flatpak@0.6.0 (node_modules\electron-installer-flatpak):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for electron-installer-flatpak@0.6.0: wanted {"os":"darwin,linux","arch":"any"} (current: {"o
s":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron-installer-debian@0.5.2 (node_modules\electron-installer-debian):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for electron-installer-debian@0.5.2: wanted {"os":"darwin,linux","arch":"any"} (current: {"os
":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: appdmg@0.4.5 (node_modules\appdmg):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for appdmg@0.4.5: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs-xattr@0.1.17 (node_modules\fs-xattr):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fs-xattr@0.1.17: wanted {"os":"!win32","arch":"any"} (current: {"os":"win32","arch":"x64"
})

+ babel-plugin-transform-async-to-generator@6.24.1
+ babel-preset-env@1.6.0
+ babel-preset-react@6.24.1
+ electron-forge@4.1.2
added 578 packages in 37.856s
  electron-forge:init:npm installing exact dependencies +39s
  electron-forge:dependency-installer installing ["electron-prebuilt-compile"] in: D:\Docs\Scripts\JS\test_1 dev=true,exact=true,withYarn=false +39s
  electron-forge:dependency-installer executing ["install","electron-prebuilt-compile","--save-exact","--save-dev"] in: D:\Docs\Scripts\JS\test_1 +2ms
  electron-forge:runtime-config fetching key verbose +39s
npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer
npm WARN deprecated safe-to-string-x@2.0.3: Moved to https://github.com/Xotic750/to-string-symbols-supported-x

> electron@1.7.9 postinstall D:\Docs\Scripts\JS\test_1\node_modules\electron-prebuilt-compile\node_modules\electron
> node install.js

npm WARN test_1@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs-xattr@0.1.17 (node_modules\fs-xattr):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fs-xattr@0.1.17: wanted {"os":"!win32","arch":"any"} (current: {"os":"win32","arch":"x64"
})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron-installer-debian@0.5.2 (node_modules\electron-installer-debian):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for electron-installer-debian@0.5.2: wanted {"os":"darwin,linux","arch":"any"} (current: {"os
":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron-installer-redhat@0.5.0 (node_modules\electron-installer-redhat):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for electron-installer-redhat@0.5.0: wanted {"os":"darwin,linux","arch":"any"} (current: {"os
":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: appdmg@0.4.5 (node_modules\appdmg):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for appdmg@0.4.5: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: macos-alias@0.2.11 (node_modules\macos-alias):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for macos-alias@0.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x
64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron-installer-flatpak@0.6.0 (node_modules\electron-installer-flatpak):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for electron-installer-flatpak@0.6.0: wanted {"os":"darwin,linux","arch":"any"} (current: {"o
s":"win32","arch":"x64"})

+ electron-prebuilt-compile@1.7.9
added 347 packages in 25.632s
  electron-forge:init:npm not installing linting deps +27s
  electron-forge:lifecycle Process Succeeded: Installing NPM Dependencies +1m
  electron-forge:lifecycle Process Started: Locating custom template: "react-typescript" +3ms
  electron-forge:init:custom using local template +0ms
  electron-forge:lifecycle Process Succeeded: Locating custom template: "react-typescript" +12ms
  electron-forge:lifecycle Process Started: Installing Template Dependencies +4ms
  electron-forge:init:custom installing dependencies +8ms
  electron-forge:dependency-installer installing ["react@^15.4.1","react-dom@^15.4.1","@types/react@^0.14.55","@types/react-dom@^0.14.20","@types/electron-devto
ols-installer@^2.0.2","electron-devtools-installer@^2.1.0","react-hot-loader@^3.0.0-beta.6","tslib@^1.4.0"] in: D:\Docs\Scripts\JS\test_1 dev=false,exact=false,
withYarn=false +27s
  electron-forge:dependency-installer executing ["install","react@^15.4.1","react-dom@^15.4.1","@types/react@^0.14.55","@types/react-dom@^0.14.20","@types/elect
ron-devtools-installer@^2.0.2","electron-devtools-installer@^2.1.0","react-hot-loader@^3.0.0-beta.6","tslib@^1.4.0","--save"] in: D:\Docs\Scripts\JS\test_1 +4ms

  electron-forge:runtime-config fetching key verbose +27s
npm WARN deprecated safe-to-string-x@2.0.3: Moved to https://github.com/Xotic750/to-string-symbols-supported-x
npm ERR! path D:\Docs\Scripts\JS\test_1\node_modules\electron-installer-redhat\node_modules
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall lstat
npm ERR! Error: EPERM: operation not permitted, lstat 'D:\Docs\Scripts\JS\test_1\node_modules\electron-installer-redhat\node_modules'
npm ERR!  { Error: EPERM: operation not permitted, lstat 'D:\Docs\Scripts\JS\test_1\node_modules\electron-installer-redhat\node_modules'
npm ERR!   stack: 'Error: EPERM: operation not permitted, lstat \'D:\\Docs\\Scripts\\JS\\test_1\\node_modules\\electron-installer-redhat\\node_modules\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'lstat',
npm ERR!   path: 'D:\\Docs\\Scripts\\JS\\test_1\\node_modules\\electron-installer-redhat\\node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\Apps\Roaming\npm-cache\_logs\2017-10-15T21_35_33_165Z-debug.log
  electron-forge:lifecycle Process Failed: Installing Template Dependencies +13s

An unhandled error has occurred inside Forge:
Failed to install modules: ["react@^15.4.1","react-dom@^15.4.1","@types/react@^0.14.55","@types/react-dom@^0.14.20","@types/electron-devtools-installer@^2.0.2",
"electron-devtools-installer@^2.1.0","react-hot-loader@^3.0.0-beta.6","tslib@^1.4.0"]

With output: Exited with status 4294963248
Error: Failed to install modules: ["react@^15.4.1","react-dom@^15.4.1","@types/react@^0.14.55","@types/react-dom@^0.14.20","@types/electron-devtools-installer@^
2.0.2","electron-devtools-installer@^2.1.0","react-hot-loader@^3.0.0-beta.6","tslib@^1.4.0"]

With output: Exited with status 4294963248
    at _callee$ (D:\Apps\Roaming\npm\node_modules\electron-forge\dist\util\install-dependencies.js:81:19)
    at tryCatch (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\regenerator-runtime\runtime.js:65:40)
    at Generator.invoke [as _invoke] (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\regenerator-runtime\runtime.js:299:22)
    at Generator.prototype.(anonymous function) [as throw] (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\regenerator-runtime\runtime.js:117:21)
    at Generator.tryCatcher (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\util.js:16:23)
    at PromiseSpawn._promiseRejected (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\generators.js:107:10)
    at Promise._settlePromise (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\promise.js:576:26)
    at Promise._settlePromise0 (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\promise.js:614:10)
    at Promise._settlePromises (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\promise.js:689:18)
    at Async._drainQueue (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\async.js:133:16)
    at Async._drainQueues (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\async.js:143:10)
    at Immediate.Async.drainQueues (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\async.js:17:14)
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)

D:\Docs\Scripts\JS>
MarshallOfSound commented 6 years ago

@Wonderer0 What version of npm are you using, this looks distinctly like an NPM issue (it appears to be trying to lstat a directory that it claimed a few lines higher it wouldn't try to create)

Wonderer0 commented 6 years ago

Before installing electron-forge I opened a cmd window (still open) and updated npm:

C:\Windows\System32>npm -v
5.3.0

   ?─────────────────────────────────────?
   │                                     │
   │   Update available 5.3.0 → 5.5.1    │
   │     Run npm i -g npm to update      │
   │                                     │
   ?─────────────────────────────────────?

C:\Windows\System32>npm i -g npm
D:\Apps\Roaming\npm\npm -> D:\Apps\Roaming\npm\node_modules\npm\bin\npm-cli.js
D:\Apps\Roaming\npm\npx -> D:\Apps\Roaming\npm\node_modules\npm\bin\npx-cli.js
+ npm@5.5.1
added 460 packages in 21.042s

C:\Windows\System32>npm install -g electron-forge

I then tried running electron-forge init in a different window at the parent folder of the new electron project, with the results described above. Checking the version of npm in that window now gives a self-inconsistent answer:

D:\Docs\Scripts\JS>npm -v
5.5.1

   ?─────────────────────────────────────?
   │                                     │
   │   Update available 5.3.0 → 5.5.1    │
   │     Run npm i -g npm to update      │
   │                                     │
   ?─────────────────────────────────────?

D:\Docs\Scripts\JS>

i.e. On 5.5.1 already but need to upgrade to 5.5.1 ! Which is really being used ??

On opening a new window now at the parent folder npm seems to be fully at 5.5.1. Trying electron-forge init again three times gives mixed results:

  1. Failed, when I had forgotten to use debug and verbose.
  2. Succeeded, when using debug and verbose.
  3. Failed, when using debug and verbose (identical run immediately after (2)).

Below are the outputs from both runs (2) and (3). They seem to be skipping optional dependencies in different orders. Is this because npm is non-deterministic?

Run (2) succeeds:

D:\Docs\Scripts\JS>npm -v
5.5.1

D:\Docs\Scripts\JS>set DEBUG=electron-forge:*

D:\Docs\Scripts\JS>electron-forge --verbose init test_1 --template=react-typescript
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Checking your system +0ms
  electron-forge:lifecycle Process Succeeded: Checking your system +1s
  electron-forge:runtime-config setting key: verbose to value: true +0ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:init Initializing in: D:\Docs\Scripts\JS\test_1 +0ms
  electron-forge:lifecycle Process Started: Initializing Project Directory +0ms
  electron-forge:init:directory creating directory: D:\Docs\Scripts\JS\test_1 +0ms
  electron-forge:init:directory found 7 files in the directory.  warning the user +0ms
  electron-forge:lifecycle Process Stopped: Initializing Project Directory +0ms
? WARNING: The specified path: "D:\Docs\Scripts\JS\test_1" is not empty, do you wish to continue? Yes
  electron-forge:lifecycle Process Succeeded: Initializing Project Directory +4s
  electron-forge:lifecycle Process Started: Initializing Git Repository +0ms
  electron-forge:init:git .git directory already exists, skipping git initialization +0ms
  electron-forge:lifecycle Process Succeeded: Initializing Git Repository +0ms
  electron-forge:lifecycle Process Started: Copying Starter Files +15ms
  electron-forge:init:starter-files creating directory: D:\Docs\Scripts\JS\test_1\src +0ms
  electron-forge:init:starter-files copying "D:\Apps\Roaming\npm\node_modules\electron-forge\tmpl\_gitignore" --> "D:\Docs\Scripts\JS\test_1\.gitignore" +0ms
  electron-forge:init:starter-files copying "D:\Apps\Roaming\npm\node_modules\electron-forge\tmpl\_compilerc" --> "D:\Docs\Scripts\JS\test_1\.compilerc" +16ms
  electron-forge:init:starter-files copying "D:\Apps\Roaming\npm\node_modules\electron-forge\tmpl\index.js" --> "D:\Docs\Scripts\JS\test_1\src\index.js" +0ms
  electron-forge:init:starter-files copying "D:\Apps\Roaming\npm\node_modules\electron-forge\tmpl\index.html" --> "D:\Docs\Scripts\JS\test_1\src\index.html" +0m
s
  electron-forge:lifecycle Process Succeeded: Copying Starter Files +31ms
  electron-forge:lifecycle Process Started: Initializing NPM Module +0ms
  electron-forge:init:npm writing package.json to: D:\Docs\Scripts\JS\test_1 +0ms
  electron-forge:lifecycle Process Succeeded: Initializing NPM Module +47ms
  electron-forge:lifecycle Process Started: Installing NPM Dependencies +0ms
  electron-forge:init:npm installing dependencies +16ms
  electron-forge:dependency-installer installing ["electron-compile","electron-squirrel-startup"] in: D:\Docs\Scripts\JS\test_1 dev=false,exact=false,withYarn=f
alse +0ms
  electron-forge:dependency-installer executing ["install","electron-compile","electron-squirrel-startup","--save"] in: D:\Docs\Scripts\JS\test_1 +0ms
  electron-forge:runtime-config fetching key verbose +0ms
npm WARN test_1@1.0.0 No repository field.

+ electron-compile@6.4.2
+ electron-squirrel-startup@1.0.0
removed 502 packages and updated 2 packages in 7.066s
  electron-forge:init:npm installing devDependencies +8s
  electron-forge:dependency-installer installing ["babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator","electron-forge"] in: D:\D
ocs\Scripts\JS\test_1 dev=true,exact=false,withYarn=false +8s
  electron-forge:dependency-installer executing ["install","babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator","electron-forge",
"--save-dev"] in: D:\Docs\Scripts\JS\test_1 +0ms
  electron-forge:runtime-config fetching key verbose +9s
npm WARN deprecated safe-to-string-x@2.0.3: Moved to https://github.com/Xotic750/to-string-symbols-supported-x
npm WARN deprecated wrench@1.5.9: wrench.js is deprecated! You should check out fs-extra (https://github.com/jprichardson/node-fs-extra) for any operations you
were using wrench for. Thanks for all the usage over the years.
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

> electron-forge@4.1.2 install D:\Docs\Scripts\JS\test_1\node_modules\electron-forge
> node tabtab-install.js

> spawn-sync@1.0.15 postinstall D:\Docs\Scripts\JS\test_1\node_modules\spawn-sync
> node postinstall

npm WARN test_1@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron-installer-flatpak@0.6.0 (node_modules\electron-installer-flatpak):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for electron-installer-flatpak@0.6.0: wanted {"os":"darwin,linux","arch":"any"} (current: {"o
s":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron-installer-redhat@0.5.0 (node_modules\electron-installer-redhat):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for electron-installer-redhat@0.5.0: wanted {"os":"darwin,linux","arch":"any"} (current: {"os
":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron-installer-debian@0.5.2 (node_modules\electron-installer-debian):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for electron-installer-debian@0.5.2: wanted {"os":"darwin,linux","arch":"any"} (current: {"os
":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs-xattr@0.1.17 (node_modules\fs-xattr):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fs-xattr@0.1.17: wanted {"os":"!win32","arch":"any"} (current: {"os":"win32","arch":"x64"
})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: appdmg@0.4.5 (node_modules\appdmg):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for appdmg@0.4.5: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: macos-alias@0.2.11 (node_modules\macos-alias):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for macos-alias@0.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x
64"})

+ babel-preset-react@6.24.1
+ babel-plugin-transform-async-to-generator@6.24.1
+ babel-preset-env@1.6.0
+ electron-forge@4.1.2
added 578 packages in 32.882s
  electron-forge:init:npm installing exact dependencies +34s
  electron-forge:dependency-installer installing ["electron-prebuilt-compile"] in: D:\Docs\Scripts\JS\test_1 dev=true,exact=true,withYarn=false +34s
  electron-forge:dependency-installer executing ["install","electron-prebuilt-compile","--save-exact","--save-dev"] in: D:\Docs\Scripts\JS\test_1 +0ms
  electron-forge:runtime-config fetching key verbose +34s
npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer
npm WARN deprecated safe-to-string-x@2.0.3: Moved to https://github.com/Xotic750/to-string-symbols-supported-x

> electron@1.7.9 postinstall D:\Docs\Scripts\JS\test_1\node_modules\electron-prebuilt-compile\node_modules\electron
> node install.js

npm WARN test_1@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs-xattr@0.1.17 (node_modules\fs-xattr):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fs-xattr@0.1.17: wanted {"os":"!win32","arch":"any"} (current: {"os":"win32","arch":"x64"
})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron-installer-redhat@0.5.0 (node_modules\electron-installer-redhat):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for electron-installer-redhat@0.5.0: wanted {"os":"darwin,linux","arch":"any"} (current: {"os
":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron-installer-debian@0.5.2 (node_modules\electron-installer-debian):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for electron-installer-debian@0.5.2: wanted {"os":"darwin,linux","arch":"any"} (current: {"os
":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: appdmg@0.4.5 (node_modules\appdmg):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for appdmg@0.4.5: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: macos-alias@0.2.11 (node_modules\macos-alias):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for macos-alias@0.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x
64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron-installer-flatpak@0.6.0 (node_modules\electron-installer-flatpak):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for electron-installer-flatpak@0.6.0: wanted {"os":"darwin,linux","arch":"any"} (current: {"o
s":"win32","arch":"x64"})

+ electron-prebuilt-compile@1.7.9
added 318 packages and updated 1 package in 26.832s
  electron-forge:init:npm not installing linting deps +28s
  electron-forge:lifecycle Process Succeeded: Installing NPM Dependencies +1m
  electron-forge:lifecycle Process Started: Locating custom template: "react-typescript" +0ms
  electron-forge:init:custom using local template +0ms
  electron-forge:lifecycle Process Succeeded: Locating custom template: "react-typescript" +0ms
  electron-forge:lifecycle Process Started: Installing Template Dependencies +16ms
  electron-forge:init:custom installing dependencies +16ms
  electron-forge:dependency-installer installing ["react@^15.4.1","react-dom@^15.4.1","@types/react@^0.14.55","@types/react-dom@^0.14.20","@types/electron-devto
ols-installer@^2.0.2","electron-devtools-installer@^2.1.0","react-hot-loader@^3.0.0-beta.6","tslib@^1.4.0"] in: D:\Docs\Scripts\JS\test_1 dev=false,exact=false,
withYarn=false +28s
  electron-forge:dependency-installer executing ["install","react@^15.4.1","react-dom@^15.4.1","@types/react@^0.14.55","@types/react-dom@^0.14.20","@types/elect
ron-devtools-installer@^2.0.2","electron-devtools-installer@^2.1.0","react-hot-loader@^3.0.0-beta.6","tslib@^1.4.0","--save"] in: D:\Docs\Scripts\JS\test_1 +0ms

  electron-forge:runtime-config fetching key verbose +28s
npm WARN deprecated safe-to-string-x@2.0.3: Moved to https://github.com/Xotic750/to-string-symbols-supported-x
npm WARN test_1@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: macos-alias@0.2.11 (node_modules\macos-alias):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for macos-alias@0.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x
64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron-installer-flatpak@0.6.0 (node_modules\electron-installer-flatpak):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for electron-installer-flatpak@0.6.0: wanted {"os":"darwin,linux","arch":"any"} (current: {"o
s":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs-xattr@0.1.17 (node_modules\fs-xattr):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fs-xattr@0.1.17: wanted {"os":"!win32","arch":"any"} (current: {"os":"win32","arch":"x64"
})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron-installer-redhat@0.5.0 (node_modules\electron-installer-redhat):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for electron-installer-redhat@0.5.0: wanted {"os":"darwin,linux","arch":"any"} (current: {"os
":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron-installer-debian@0.5.2 (node_modules\electron-installer-debian):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for electron-installer-debian@0.5.2: wanted {"os":"darwin,linux","arch":"any"} (current: {"os
":"win32","arch":"x64"})

+ react-hot-loader@3.1.1
+ react@15.6.2
+ tslib@1.8.0
+ react-dom@15.6.2
+ electron-devtools-installer@2.2.0
+ @types/electron-devtools-installer@2.0.2
+ @types/react@0.14.57
+ @types/react-dom@0.14.23
added 107 packages in 11.247s
  electron-forge:init:custom installing devDependencies +13s
  electron-forge:dependency-installer installing ["tslint@^5.1.0","typescript@~2.2.2"] in: D:\Docs\Scripts\JS\test_1 dev=true,exact=false,withYarn=false +13s
  electron-forge:dependency-installer executing ["install","tslint@^5.1.0","typescript@~2.2.2","--save-dev"] in: D:\Docs\Scripts\JS\test_1 +0ms
  electron-forge:runtime-config fetching key verbose +13s
npm WARN deprecated safe-to-string-x@2.0.3: Moved to https://github.com/Xotic750/to-string-symbols-supported-x
npm WARN test_1@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: macos-alias@0.2.11 (node_modules\macos-alias):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for macos-alias@0.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x
64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron-installer-flatpak@0.6.0 (node_modules\electron-installer-flatpak):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for electron-installer-flatpak@0.6.0: wanted {"os":"darwin,linux","arch":"any"} (current: {"o
s":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs-xattr@0.1.17 (node_modules\fs-xattr):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fs-xattr@0.1.17: wanted {"os":"!win32","arch":"any"} (current: {"os":"win32","arch":"x64"
})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron-installer-debian@0.5.2 (node_modules\electron-installer-debian):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for electron-installer-debian@0.5.2: wanted {"os":"darwin,linux","arch":"any"} (current: {"os
":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron-installer-redhat@0.5.0 (node_modules\electron-installer-redhat):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for electron-installer-redhat@0.5.0: wanted {"os":"darwin,linux","arch":"any"} (current: {"os
":"win32","arch":"x64"})

+ typescript@2.2.2
+ tslint@5.7.0
added 78 packages and updated 1 package in 13.712s
  electron-forge:lifecycle Process Succeeded: Installing Template Dependencies +28s
  electron-forge:lifecycle Process Started: Copying Template Files +0ms
  electron-forge:init:starter-files copying "D:/Apps/Roaming/npm/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/_compile
rc" --> "D:\Docs\Scripts\JS\test_1\.compilerc" +2m
  electron-forge:init:starter-files copying "D:/Apps/Roaming/npm/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/src/app.
tsx" --> "D:\Docs\Scripts\JS\test_1\src\app.tsx" +16ms
  electron-forge:init:starter-files copying "D:/Apps/Roaming/npm/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/src/inde
x.html" --> "D:\Docs\Scripts\JS\test_1\src\index.html" +0ms
  electron-forge:init:starter-files copying "D:/Apps/Roaming/npm/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/src/inde
x.ts" --> "D:\Docs\Scripts\JS\test_1\src\index.ts" +15ms
  electron-forge:init:starter-files copying "D:/Apps/Roaming/npm/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/tsconfig
.json" --> "D:\Docs\Scripts\JS\test_1\tsconfig.json" +0ms
  electron-forge:init:starter-files copying "D:/Apps/Roaming/npm/node_modules/electron-forge/node_modules/electron-forge-template-react-typescript/tmpl/tslint.j
son" --> "D:\Docs\Scripts\JS\test_1\tslint.json" +0ms
  electron-forge:lifecycle Process Succeeded: Copying Template Files +62ms

D:\Docs\Scripts\JS>npm -v
5.5.1

Run (3) fails:

D:\Docs\Scripts\JS>electron-forge --verbose init test_1 --template=react-typescript
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Checking your system +0ms
  electron-forge:lifecycle Process Succeeded: Checking your system +1s
  electron-forge:runtime-config setting key: verbose to value: true +0ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:init Initializing in: D:\Docs\Scripts\JS\test_1 +0ms
  electron-forge:lifecycle Process Started: Initializing Project Directory +0ms
  electron-forge:init:directory creating directory: D:\Docs\Scripts\JS\test_1 +0ms
  electron-forge:init:directory found 9 files in the directory.  warning the user +15ms
  electron-forge:lifecycle Process Stopped: Initializing Project Directory +15ms
? WARNING: The specified path: "D:\Docs\Scripts\JS\test_1" is not empty, do you wish to continue? Yes
  electron-forge:lifecycle Process Succeeded: Initializing Project Directory +5s
  electron-forge:lifecycle Process Started: Initializing Git Repository +0ms
  electron-forge:init:git .git directory already exists, skipping git initialization +0ms
  electron-forge:lifecycle Process Succeeded: Initializing Git Repository +0ms
  electron-forge:lifecycle Process Started: Copying Starter Files +16ms
  electron-forge:init:starter-files creating directory: D:\Docs\Scripts\JS\test_1\src +0ms
  electron-forge:init:starter-files copying "D:\Apps\Roaming\npm\node_modules\electron-forge\tmpl\_gitignore" --> "D:\Docs\Scripts\JS\test_1\.gitignore" +0ms
  electron-forge:init:starter-files copying "D:\Apps\Roaming\npm\node_modules\electron-forge\tmpl\_compilerc" --> "D:\Docs\Scripts\JS\test_1\.compilerc" +16ms
  electron-forge:init:starter-files copying "D:\Apps\Roaming\npm\node_modules\electron-forge\tmpl\index.js" --> "D:\Docs\Scripts\JS\test_1\src\index.js" +0ms
  electron-forge:init:starter-files copying "D:\Apps\Roaming\npm\node_modules\electron-forge\tmpl\index.html" --> "D:\Docs\Scripts\JS\test_1\src\index.html" +15
ms
  electron-forge:lifecycle Process Succeeded: Copying Starter Files +31ms
  electron-forge:lifecycle Process Started: Initializing NPM Module +0ms
  electron-forge:init:npm writing package.json to: D:\Docs\Scripts\JS\test_1 +0ms
  electron-forge:lifecycle Process Succeeded: Initializing NPM Module +78ms
  electron-forge:lifecycle Process Started: Installing NPM Dependencies +0ms
  electron-forge:init:npm installing dependencies +0ms
  electron-forge:dependency-installer installing ["electron-compile","electron-squirrel-startup"] in: D:\Docs\Scripts\JS\test_1 dev=false,exact=false,withYarn=f
alse +0ms
  electron-forge:dependency-installer executing ["install","electron-compile","electron-squirrel-startup","--save"] in: D:\Docs\Scripts\JS\test_1 +0ms
  electron-forge:runtime-config fetching key verbose +0ms
npm WARN deprecated safe-to-string-x@2.0.3: Moved to https://github.com/Xotic750/to-string-symbols-supported-x
npm WARN test_1@1.0.0 No repository field.

+ electron-compile@6.4.2
+ electron-squirrel-startup@1.0.0
removed 780 packages and updated 2 packages in 13.244s
  electron-forge:init:npm installing devDependencies +15s
  electron-forge:dependency-installer installing ["babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator","electron-forge"] in: D:\D
ocs\Scripts\JS\test_1 dev=true,exact=false,withYarn=false +15s
  electron-forge:dependency-installer executing ["install","babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator","electron-forge",
"--save-dev"] in: D:\Docs\Scripts\JS\test_1 +0ms
  electron-forge:runtime-config fetching key verbose +15s
npm WARN deprecated safe-to-string-x@2.0.3: Moved to https://github.com/Xotic750/to-string-symbols-supported-x
npm WARN deprecated wrench@1.5.9: wrench.js is deprecated! You should check out fs-extra (https://github.com/jprichardson/node-fs-extra) for any operations you
were using wrench for. Thanks for all the usage over the years.
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

> electron-forge@4.1.2 install D:\Docs\Scripts\JS\test_1\node_modules\electron-forge
> node tabtab-install.js

> spawn-sync@1.0.15 postinstall D:\Docs\Scripts\JS\test_1\node_modules\spawn-sync
> node postinstall

npm WARN test_1@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron-installer-redhat@0.5.0 (node_modules\electron-installer-redhat):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for electron-installer-redhat@0.5.0: wanted {"os":"darwin,linux","arch":"any"} (current: {"os
":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron-installer-flatpak@0.6.0 (node_modules\electron-installer-flatpak):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for electron-installer-flatpak@0.6.0: wanted {"os":"darwin,linux","arch":"any"} (current: {"o
s":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron-installer-debian@0.5.2 (node_modules\electron-installer-debian):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for electron-installer-debian@0.5.2: wanted {"os":"darwin,linux","arch":"any"} (current: {"os
":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: appdmg@0.4.5 (node_modules\appdmg):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for appdmg@0.4.5: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs-xattr@0.1.17 (node_modules\fs-xattr):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fs-xattr@0.1.17: wanted {"os":"!win32","arch":"any"} (current: {"os":"win32","arch":"x64"
})

+ babel-preset-react@6.24.1
+ babel-preset-env@1.6.0
+ babel-plugin-transform-async-to-generator@6.24.1
+ electron-forge@4.1.2
added 578 packages in 29.469s
  electron-forge:init:npm installing exact dependencies +31s
  electron-forge:dependency-installer installing ["electron-prebuilt-compile"] in: D:\Docs\Scripts\JS\test_1 dev=true,exact=true,withYarn=false +31s
  electron-forge:dependency-installer executing ["install","electron-prebuilt-compile","--save-exact","--save-dev"] in: D:\Docs\Scripts\JS\test_1 +16ms
  electron-forge:runtime-config fetching key verbose +31s
npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer
npm WARN deprecated safe-to-string-x@2.0.3: Moved to https://github.com/Xotic750/to-string-symbols-supported-x

> electron@1.7.9 postinstall D:\Docs\Scripts\JS\test_1\node_modules\electron-prebuilt-compile\node_modules\electron
> node install.js

npm ERR! path D:\Docs\Scripts\JS\test_1\node_modules\flatpak-bundler\node_modules
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall scandir
npm ERR! Error: EPERM: operation not permitted, scandir 'D:\Docs\Scripts\JS\test_1\node_modules\flatpak-bundler\node_modules'
npm ERR!  { Error: EPERM: operation not permitted, scandir 'D:\Docs\Scripts\JS\test_1\node_modules\flatpak-bundler\node_modules'
npm ERR!   stack: 'Error: EPERM: operation not permitted, scandir \'D:\\Docs\\Scripts\\JS\\test_1\\node_modules\\flatpak-bundler\\node_modules\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'scandir',
npm ERR!   path: 'D:\\Docs\\Scripts\\JS\\test_1\\node_modules\\flatpak-bundler\\node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\Apps\Roaming\npm-cache\_logs\2017-10-16T12_49_33_336Z-debug.log
  electron-forge:lifecycle Process Failed: Installing NPM Dependencies +1m

An unhandled error has occurred inside Forge:
Failed to install modules: ["electron-prebuilt-compile"]

With output: Exited with status 4294963248
Error: Failed to install modules: ["electron-prebuilt-compile"]

With output: Exited with status 4294963248
    at _callee$ (D:\Apps\Roaming\npm\node_modules\electron-forge\dist\util\install-dependencies.js:81:19)
    at tryCatch (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\regenerator-runtime\runtime.js:65:40)
    at Generator.invoke [as _invoke] (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\regenerator-runtime\runtime.js:299:22)
    at Generator.prototype.(anonymous function) [as throw] (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\regenerator-runtime\runtime.js:117:21)
    at Generator.tryCatcher (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\util.js:16:23)
    at PromiseSpawn._promiseRejected (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\generators.js:107:10)
    at Promise._settlePromise (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\promise.js:576:26)
    at Promise._settlePromise0 (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\promise.js:614:10)
    at Promise._settlePromises (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\promise.js:689:18)
    at Async._drainQueue (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\async.js:133:16)
    at Async._drainQueues (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\async.js:143:10)
    at Immediate.Async.drainQueues (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\async.js:17:14)
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)

D:\Docs\Scripts\JS>npm -v
5.5.1
MarshallOfSound commented 6 years ago

@Wonderer0 Sounds like your npm is quite borked 😆 Would recommend uninstalling the world and reinstalling 👍

Wonderer0 commented 6 years ago

@MarshallOfSound I uninstalled node.js and also renamed npm to npm_NOT in %appdata%.
Then in the default cmd window: installed node-v8.7.0-x64.msi; ran npm i -g npm (5.4.2 -> 5.5.1); used npm to install electron and electron-forge.

Then opened a new cmd window at the project's parent directory and ran electon-forge init again, first without debugging, then when that failed with debugging. The output of the second run is below, it doesn't seem to have the same warnings WARN optional SKIPPING OPTIONAL DEPENDENCY as previously but still fails to install the babel modules.

D:\Docs\Scripts\JS>npm -v
5.5.1

D:\Docs\Scripts\JS>set DEBUG=electron-forge:*

D:\Docs\Scripts\JS>electron-forge --verbose init test_1 --template=react-typescript
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Checking your system +0ms
  electron-forge:lifecycle Process Succeeded: Checking your system +734ms
  electron-forge:runtime-config setting key: verbose to value: true +0ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:init Initializing in: D:\Docs\Scripts\JS\test_1 +0ms
  electron-forge:lifecycle Process Started: Initializing Project Directory +0ms
  electron-forge:init:directory creating directory: D:\Docs\Scripts\JS\test_1 +0ms
  electron-forge:init:directory found 9 files in the directory.  warning the user +0ms
  electron-forge:lifecycle Process Stopped: Initializing Project Directory +0ms
? WARNING: The specified path: "D:\Docs\Scripts\JS\test_1" is not empty, do you wish to continue? Yes
  electron-forge:lifecycle Process Succeeded: Initializing Project Directory +5s
  electron-forge:lifecycle Process Started: Initializing Git Repository +16ms
  electron-forge:init:git .git directory already exists, skipping git initialization +0ms
  electron-forge:lifecycle Process Succeeded: Initializing Git Repository +0ms
  electron-forge:lifecycle Process Started: Copying Starter Files +0ms
  electron-forge:init:starter-files creating directory: D:\Docs\Scripts\JS\test_1\src +0ms
  electron-forge:init:starter-files copying "D:\Apps\Roaming\npm\node_modules\electron-forge\tmpl\_gitignore" --> "D:\Docs\Scripts\JS\test_1\.gitignore" +0ms
  electron-forge:init:starter-files copying "D:\Apps\Roaming\npm\node_modules\electron-forge\tmpl\_compilerc" --> "D:\Docs\Scripts\JS\test_1\.compilerc" +16ms
  electron-forge:init:starter-files copying "D:\Apps\Roaming\npm\node_modules\electron-forge\tmpl\index.js" --> "D:\Docs\Scripts\JS\test_1\src\index.js" +0ms
  electron-forge:init:starter-files copying "D:\Apps\Roaming\npm\node_modules\electron-forge\tmpl\index.html" --> "D:\Docs\Scripts\JS\test_1\src\index.html" +15ms
  electron-forge:lifecycle Process Succeeded: Copying Starter Files +31ms
  electron-forge:lifecycle Process Started: Initializing NPM Module +0ms
  electron-forge:init:npm writing package.json to: D:\Docs\Scripts\JS\test_1 +0ms
  electron-forge:lifecycle Process Succeeded: Initializing NPM Module +47ms
  electron-forge:lifecycle Process Started: Installing NPM Dependencies +0ms
  electron-forge:init:npm installing dependencies +0ms
  electron-forge:dependency-installer installing ["electron-compile","electron-squirrel-startup"] in: D:\Docs\Scripts\JS\test_1 dev=false,exact=false,withYarn=false +0ms
  electron-forge:dependency-installer executing ["install","electron-compile","electron-squirrel-startup","--save"] in: D:\Docs\Scripts\JS\test_1 +0ms
  electron-forge:runtime-config fetching key verbose +0ms
npm WARN test_1@1.0.0 No repository field.

+ electron-squirrel-startup@1.0.0
+ electron-compile@6.4.2
removed 473 packages and updated 2 packages in 6.739s
  electron-forge:init:npm installing devDependencies +8s
  electron-forge:dependency-installer installing ["babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator","electron-forge"] in: D:\Docs\Scripts\JS\test_1 dev=true,exact=fal
se,withYarn=false +8s
  electron-forge:dependency-installer executing ["install","babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator","electron-forge","--save-dev"] in: D:\Docs\Scripts\JS\tes
t_1 +0ms
  electron-forge:runtime-config fetching key verbose +8s
npm WARN deprecated safe-to-string-x@2.0.3: Moved to https://github.com/Xotic750/to-string-symbols-supported-x
npm WARN deprecated wrench@1.5.9: wrench.js is deprecated! You should check out fs-extra (https://github.com/jprichardson/node-fs-extra) for any operations you were using wrench for. Thanks for all th
e usage over the years.
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

> electron-forge@4.1.2 install D:\Docs\Scripts\JS\test_1\node_modules\electron-forge
> node tabtab-install.js

> spawn-sync@1.0.15 postinstall D:\Docs\Scripts\JS\test_1\node_modules\spawn-sync
> node postinstall

npm ERR! path D:\Docs\Scripts\JS\test_1\node_modules\get-folder-size\node_modules
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall scandir
npm ERR! Error: EPERM: operation not permitted, scandir 'D:\Docs\Scripts\JS\test_1\node_modules\get-folder-size\node_modules'
npm ERR!  { Error: EPERM: operation not permitted, scandir 'D:\Docs\Scripts\JS\test_1\node_modules\get-folder-size\node_modules'
npm ERR!   stack: 'Error: EPERM: operation not permitted, scandir \'D:\\Docs\\Scripts\\JS\\test_1\\node_modules\\get-folder-size\\node_modules\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'scandir',
npm ERR!   path: 'D:\\Docs\\Scripts\\JS\\test_1\\node_modules\\get-folder-size\\node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\Apps\Roaming\npm-cache\_logs\2017-10-16T19_02_34_113Z-debug.log
  electron-forge:lifecycle Process Failed: Installing NPM Dependencies +45s

An unhandled error has occurred inside Forge:
Failed to install modules: ["babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator","electron-forge"]

With output: Exited with status 4294963248
Error: Failed to install modules: ["babel-preset-env","babel-preset-react","babel-plugin-transform-async-to-generator","electron-forge"]

With output: Exited with status 4294963248
    at _callee$ (D:\Apps\Roaming\npm\node_modules\electron-forge\dist\util\install-dependencies.js:81:19)
    at tryCatch (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\regenerator-runtime\runtime.js:65:40)
    at Generator.invoke [as _invoke] (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\regenerator-runtime\runtime.js:299:22)
    at Generator.prototype.(anonymous function) [as throw] (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\regenerator-runtime\runtime.js:117:21)
    at Generator.tryCatcher (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\util.js:16:23)
    at PromiseSpawn._promiseRejected (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\generators.js:107:10)
    at Promise._settlePromise (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\promise.js:576:26)
    at Promise._settlePromise0 (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\promise.js:614:10)
    at Promise._settlePromises (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\promise.js:689:18)
    at Async._drainQueue (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\async.js:133:16)
    at Async._drainQueues (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\async.js:143:10)
    at Immediate.Async.drainQueues (D:\Apps\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\async.js:17:14)
    at runCallback (timers.js:785:20)
    at tryOnImmediate (timers.js:747:5)
    at processImmediate [as _immediateCallback] (timers.js:718:5)

D:\Docs\Scripts\JS>
mnemanja commented 6 years ago

I'm experiencing the same problem. Same status 4294963248.

I was able to use the electron-forge several days ago to successfully install a boilerplate project, and haven't updated it since, but today something seems to be different. I've tried 2 configurations, vanilaJs (no template) and react template and they both fail, but with different modules failed to install.

In case of vanilaJs it's the electron-prebuilt-compile and in case of react it's "electron-devtools-installer@^2.1.0","react@^15.4.1","react-dom@^15.4.1","react-hot-loader@^3.0.0-beta.6" Both returned the same status error 4294963248.

I'm using node v8.1.4 and npm v5.4.2 on Windows 10.

malept commented 6 years ago

Perhaps see what happens if you init with yarn installed?

mnemanja commented 6 years ago

I can confirm that it works with Yarn.

malept commented 6 years ago

Sounds like an NPM specific bug then? 😥

mnemanja commented 6 years ago

Probably, but what I wonder is why did Yarn not add src files for React?

This is my index.html after running yarn create electron-app rm-react --template=react --lintstyle=standard:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title></title>
  </head>
  <body>
    Well hey there!!!
  </body>
</html>

React was not installed at all....

How can I pass templates config with Yarn?

package.json:

{
    "name": "rm-react",
    "productName": "rm-react",
    "version": "1.0.0",
    "description": "My Electron application description",
    "main": "src/index.js",
    "scripts": {
        "start": "electron-forge start",
        "package": "electron-forge package",
        "make": "electron-forge make",
        "lint": "eslint src"
    },
    "keywords": [],
    "author": "nemanja",
    "license": "MIT",
    "config": {
        "forge": {
            "make_targets": {
                "win32": [
                    "squirrel"
                ],
                "darwin": [
                    "zip"
                ],
                "linux": [
                    "deb",
                    "rpm"
                ]
            },
            "electronPackagerConfig": {
                "packageManager": "yarn"
            },
            "electronWinstallerConfig": {
                "name": "rm_react"
            },
            "electronInstallerDebian": {},
            "electronInstallerRedhat": {},
            "github_repository": {
                "owner": "",
                "name": ""
            },
            "windowsStoreConfig": {
                "packageName": "",
                "name": "rmreact"
            }
        }
    },
    "dependencies": {
        "electron-compile": "^6.4.2"
    },
    "devDependencies": {
        "babel-plugin-transform-async-to-generator": "^6.24.1",
        "babel-preset-env": "^1.6.1",
        "babel-preset-react": "^6.24.1",
        "electron-forge": "^4.1.2",
        "electron-prebuilt-compile": "1.7.9",
        "eslint": "3",
        "eslint-config-airbnb": "15",
        "eslint-plugin-import": "2",
        "eslint-plugin-jsx-a11y": "5",
        "eslint-plugin-react": "7"
    }
}
malept commented 6 years ago

According to https://yarnpkg.com/en/docs/cli/create#search it should just pass the args to Electron Forge.

mnemanja commented 6 years ago

I agree, but it doesn't seem to be doing that right now.

malept commented 6 years ago

It might be a Yarn bug but I'm not sure.

mnemanja commented 6 years ago

Possibly.

Well, whatever it was, electron-forge init works for me now... :D

Wonderer0 commented 6 years ago

electron-forge --verbose init test_1 --template=react-typescript worked OK for me too after installing yarn - thanks. I had assumed that electron-forge would at least have to be reconfigured to use yarn instead of npm. Does electron-forge aleady use use yarn in preference to npm if installed, or has yarn made itself the default package installer in some way? (I'm a newbie to node, npm, yarn, electron, react ...)

When I installed yarn npm displayed a box again saying it needs to be upgraded from 5.4.2 → 5.5.1, even though it's already at the latter.

D:\Docs\Scripts\JS>npm install -g yarn
D:\Apps\Roaming\npm\yarn -> D:\Apps\Roaming\npm\node_modules\yarn\bin\yarn.js
D:\Apps\Roaming\npm\yarnpkg -> D:\Apps\Roaming\npm\node_modules\yarn\bin\yarn.js
+ yarn@1.2.1
added 1 package in 2.529s

   ?─────────────────────────────────────?
   │                                     │
   │   Update available 5.4.2 → 5.5.1    │
   │     Run npm i -g npm to update      │
   │                                     │
   ?─────────────────────────────────────?

D:\Docs\Scripts\JS>npm -v
5.5.1

npm seems be doubly non-deterministic, not only do different runs of electron-forge init give different results, but it's version number has two different values!! yarn seems to be a better way forwards.

@mnemanja
My index.html seems to have React OK :

<!DOCTYPE html>
<html lang="en">
<head>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
</head>
<body style="overflow: hidden; background-color: rgba(0,0,0,0); margin: 0" >
  <div id="App"></div>
</body>

<script>window.exports = module.exports</script>
<script type="text/tsx">
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import {AppContainer} from 'react-hot-loader';

let render = () => {
  const { App } = require('./app');
  ReactDOM.render(<AppContainer><App /></AppContainer>, document.getElementById('App'));
}

render();
if (module.hot) { module.hot.accept(render); }
</script>
</html> 

My package.json has more dependencies but fewer devDependencies than yours:

  "dependencies": {
    "@types/electron-devtools-installer": "^2.0.2",
    "@types/react": "^0.14.55",
    "@types/react-dom": "^0.14.20",
    "electron-compile": "^6.4.2",
    "electron-devtools-installer": "^2.1.0",
    "electron-squirrel-startup": "^1.0.0",
    "react": "^15.4.1",
    "react-dom": "^15.4.1",
    "react-hot-loader": "^3.0.0-beta.6",
    "tslib": "^1.4.0"
  },
  "devDependencies": {
    "babel-plugin-transform-async-to-generator": "^6.24.1",
    "babel-preset-env": "^1.6.1",
    "babel-preset-react": "^6.24.1",
    "electron-forge": "^4.1.2",
    "electron-prebuilt-compile": "1.7.9",
    "tslint": "^5.1.0",
    "typescript": "~2.2.2"
  }

Apart from ts vs js differences the only other one is that mine has a "publish": "electron-forge publish" line.

malept commented 6 years ago

Forge uses Yarn if it is installed, otherwise it falls back to using NPM.

chenzhiguo commented 6 years ago

@MarshallOfSound Will 'electron-forge' be successful on the latest 'npm' such as 5.5.x? I know I can successfully run it on 'npm@3.10.10'.

malept commented 6 years ago

I just tried running npx electron-forge init npm5test on Linux with NPM 5.4.2 and Node 8.7.0, and it worked just fine. It seems like it may be a Windows-specific problem.

malept commented 6 years ago

The EPERM syscall scandir error appears to be https://github.com/npm/npm/issues/17747, which is not a Forge-specific error. We can't do anything about that - the workarounds are to either use Yarn or an older version of NPM.

ChristianG1984 commented 6 years ago

Hello! I have nearly the same strange behaviours here on Windows 10 (Fall Creators Update).

PS D:\Tests\electron_test_1> npm -v
5.4.2
PS D:\Tests\electron_test_1> yarn -v
1.2.1

Every time, when I run electron-forge init --template=angular2, for example (you could also use react-typescript), the result is unpredictable. One time, it works. Another time, it fails. And the error types also differ from one trial to another trial. It often results in "File not found"-Errors, when the package manager wants to copy something. (But the file is there, if I check out the location.)

What I find also strange, is, that there are sometimes two lock-files created. One "yarn.lock" and a "package-lock.json". I don't know, but I think it's not good, when two package managers are concurrently active.

And if I have luck and the initialization went ok, I try to start the project a get the following:

PS D:\Tests\electron_test_1> electron-forge start
√ Checking your system
√ Locating Application
× Preparing native dependencies

An unhandled error has occurred inside Forge:
ENOENT: no such file or directory, open 'D:\Tests\electron_test_1\node_modules\electron-compile\package.json'
Error: ENOENT: no such file or directory, open 'D:\Tests\electron_test_1\node_modules\electron-compile\package.json'

(But this time, the desired package.json file is really not there.)

malept commented 6 years ago

@SachsenCoder the problems you describe seem to be different from the one that the issue reporter described. Could you make a new issue with steps to take that you can reliably reproduce?

ChristianG1984 commented 6 years ago

@malept Yes, I can open a new Issue. Only the save reproduction of the error could be a problem, because of this random behaviour. (Strange enough: I tried my own steps at home on my Surface Pro 3 with the latest Windows 10 Update, also with the same package manager versions and with the angular2 option, and it worked flawlessly. I could even start it with electron-forge start.) That's really strange, but I try to help you with that problem as good as I can and hope to find some determinism behind that problem, so that it is better reproducible.

ralph089 commented 6 years ago

Same error as @mnemanja: Issue resolved with yarn.

MarshallOfSound commented 6 years ago

This appears to just be a thread of "npm is broke" (which happened quite a lot during npm@5 first few months). Most of these issues should be fixed now and those that aren't should be raised on the npm repo if you can reproduce them by just running npm install