Closed stanbar closed 6 years ago
Both of these seem like problems with npm
rather than Forge.
In the import
case, can you re-run with the environment variable DEBUG=electron-forge:*
set?
sure
✔ Checking your system
? WARNING: We will now attempt to import: "/Users/admin1/GoogleDrive/JSProjects/
shoppinglist". This will involve modifying some files, are you sure you want to
continue? Yes
✔ Initializing Git Repository
? Do you want us to change the "main" attribute of your package.json? If you ar
e currently using babel and pointing to a "build" directory say yes. No
✔ Writing modified package.json file
✖ Installing dependencies
An unhandled error has occurred inside Forge:
Failed to install modules: ["electron-compile","electron-squirrel-startup"]
With output: Exited with status 1
Error: Failed to install modules: ["electron-compile","electron-squirrel-startup"]
With output: Exited with status 1
at /usr/local/lib/node_modules/electron-forge/dist/util/install-dependencies.js:55:13
at Generator.throw (<anonymous>)
at Generator.tryCatcher (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/util.js:16:23)
at PromiseSpawn._promiseRejected (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/generators.js:107:10)
at Promise._settlePromise (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/promise.js:576:26)
at Promise._settlePromise0 (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/promise.js:689:18)
at Async._drainQueue (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5)
That seems like it failed in a different place. Also, I'm not seeing any debug output. Please run export DEBUG='electron-forge:*'
and then re-run the import.
Yeah, sorry.
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 +876ms
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:import Attempting to import project in: /Users/admin1/GoogleDrive/JSProjects/shoppinglist +0ms
? WARNING: We will now attempt to import: "/Users/admin1/GoogleDrive/JSProjects/
shoppinglist". This will involve modifying some files, are you sure you want to
continue? Yes
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 +2ms
? Do you want us to change the "main" attribute of your package.json? If you ar
e currently using babel and pointing to a "build" directory say yes. No
electron-forge:import reading current scripts object: { start: 'electron-forge start',
'package-mac': 'electron-packager . --overwrite --platform=darwin --arch=x64 --icon=assets/icons/mac/icon.icns --prune=true --out=release-builds',
'package-win': 'electron-packager . electron-tutorial-app --overwrite --asar=true --platform=win32 --arch=ia32 --icon=assets/icons/win/icon.ico --prune=true --out=release-builds --version-string.CompanyName=CE --version-string.FileDescription=CE --version-string.ProductName="Shopping List"',
'package-linux': 'electron-packager . electron-tutorial-app --overwrite --asar=true --platform=linux --arch=x64 --icon=assets/icons/png/icon.png --prune=true --out=release-builds',
package: 'electron-forge package',
make: 'electron-forge make' } +16s
electron-forge:import forgified scripts object: { start: 'electron-forge start',
'package-mac': 'electron-packager . --overwrite --platform=darwin --arch=x64 --icon=assets/icons/mac/icon.icns --prune=true --out=release-builds',
'package-win': 'electron-packager . electron-tutorial-app --overwrite --asar=true --platform=win32 --arch=ia32 --icon=assets/icons/win/icon.ico --prune=true --out=release-builds --version-string.CompanyName=CE --version-string.FileDescription=CE --version-string.ProductName="Shopping List"',
'package-linux': 'electron-packager . electron-tutorial-app --overwrite --asar=true --platform=linux --arch=x64 --icon=assets/icons/png/icon.png --prune=true --out=release-builds',
package: 'electron-forge package',
make: 'electron-forge make' } +3ms
electron-forge:lifecycle Process Started: Writing modified package.json file +3s
electron-forge:lifecycle Process Succeeded: Writing modified package.json file +4ms
electron-forge:lifecycle Process Started: Installing dependencies +0ms
electron-forge:import deleting old dependencies forcefully +5ms
electron-forge:import installing dependencies +2ms
electron-forge:dependency-installer installing ["electron-compile","electron-squirrel-startup"] in: /Users/admin1/GoogleDrive/JSProjects/shoppinglist dev=false,exact=false,withYarn=true +0ms
electron-forge:dependency-installer executing ["add","electron-compile","electron-squirrel-startup"] in: /Users/admin1/GoogleDrive/JSProjects/shoppinglist +1ms
electron-forge:runtime-config fetching key verbose +0ms
electron-forge:lifecycle Process Failed: Installing dependencies +1s
An unhandled error has occurred inside Forge:
Failed to install modules: ["electron-compile","electron-squirrel-startup"]
With output: Exited with status 1
Error: Failed to install modules: ["electron-compile","electron-squirrel-startup"]
With output: Exited with status 1
at /usr/local/lib/node_modules/electron-forge/dist/util/install-dependencies.js:55:13
at Generator.throw (<anonymous>)
at Generator.tryCatcher (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/util.js:16:23)
at PromiseSpawn._promiseRejected (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/generators.js:107:10)
at Promise._settlePromise (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/promise.js:576:26)
at Promise._settlePromise0 (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/promise.js:689:18)
at Async._drainQueue (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5)
Any update on this? I have the same issue when running electron-forge init project-name --template=react-typescript
.
I get the following output:
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 +652ms
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: /Users/e211837/code/mediauploader +0ms
electron-forge:lifecycle Process Started: Initializing Project Directory +0ms
electron-forge:init:directory creating directory: /Users/e211837/code/mediauploader +0ms
electron-forge:lifecycle Process Succeeded: Initializing Project Directory +12ms
electron-forge:lifecycle Process Started: Initializing Git Repository +1ms
electron-forge:init:git executing "git init" in directory: /Users/e211837/code/mediauploader +0ms
electron-forge:lifecycle Process Succeeded: Initializing Git Repository +20ms
electron-forge:lifecycle Process Started: Copying Starter Files +1ms
electron-forge:init:starter-files creating directory: /Users/e211837/code/mediauploader/src +0ms
electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/tmpl/_gitignore" --> "/Users/e211837/code/mediauploader/.gitignore" +1ms
electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/tmpl/_compilerc" --> "/Users/e211837/code/mediauploader/.compilerc" +2ms
electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/tmpl/index.js" --> "/Users/e211837/code/mediauploader/src/index.js" +1ms
electron-forge:init:starter-files copying "/usr/local/lib/node_modules/electron-forge/tmpl/index.html" --> "/Users/e211837/code/mediauploader/src/index.html" +1ms
electron-forge:lifecycle Process Succeeded: Copying Starter Files +6ms
electron-forge:lifecycle Process Started: Initializing NPM Module +1ms
electron-forge:init:npm writing package.json to: /Users/e211837/code/mediauploader +0ms
electron-forge:lifecycle Process Succeeded: Initializing NPM Module +346ms
electron-forge:lifecycle Process Started: Installing NPM Dependencies +0ms
electron-forge:init:npm installing dependencies +3ms
electron-forge:dependency-installer installing ["electron-compile","electron-squirrel-startup"] in: /Users/e211837/code/mediauploader dev=false,exact=false,withYarn=true +0ms
electron-forge:dependency-installer executing ["add","electron-compile","electron-squirrel-startup"] in: /Users/e211837/code/mediauploader +0ms
electron-forge:runtime-config fetching key verbose +0ms
electron-forge:lifecycle Process Failed: Installing NPM Dependencies +2s
An unhandled error has occurred inside Forge:
Failed to install modules: ["electron-compile","electron-squirrel-startup"]
With output: Exited with status 1
Error: Failed to install modules: ["electron-compile","electron-squirrel-startup"]
With output: Exited with status 1
at /usr/local/lib/node_modules/electron-forge/dist/util/install-dependencies.js:55:13
at Generator.throw (<anonymous>)
at Generator.tryCatcher (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/util.js:16:23)
at PromiseSpawn._promiseRejected (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/generators.js:107:10)
at Promise._settlePromise (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/promise.js:576:26)
at Promise._settlePromise0 (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/promise.js:689:18)
at Async._drainQueue (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/electron-forge/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:756:18)
at tryOnImmediate (timers.js:717:5)
at processImmediate [as _immediateCallback] (timers.js:697:5)
NPM version is:
5.6.0
Electron is:
1.84
Electron-forge version is:
5.1.1
@ezweave I guess you need to run electron-forge --verbose init project-name --template=react-typescript
in order to get the output from yarn
(which is what's causing the error in both cases). Could you paste the output from that command? (and the Yarn version)
@malept Yeah, I realized it is actually a yarn
issue. I know there are some problems in getting yarn
to authenticate with a repo (our nexus host in this case).
Adding the output results in this error:
error An unexpected error occurred: "http://nexus-host-name:8081/content/groups/npm-all/btoa/-/btoa-1.1.2.tgz: Request failed \"401 Unauthorized\"".
Since others may encounter this.. I'll see if I can fix the auth issue in yarn
and post an update.
Since the errors are due to yarn instead of Electron Forge, I'm going to close this issue.
✔ Initializing NPM Module
✖ Installing NPM Dependencies
An unhandled error has occurred inside Forge:
Failed to install modules: ["electron-squirrel-startup"]
With output: Exited with status 1
Error: Failed to install modules: ["electron-squirrel-startup"]
With output: Exited with status 1
at /home/XXX/.nvm/versions/node/v8.12.0/lib/node_modules/@electron-forge/cli/node_modules/@electron-forge/core/src/util/install-dependencies.ts:34:11
at Generator.throw (<anonymous>)
at step (/home/XXX/.nvm/versions/node/v8.12.0/lib/node_modules/@electron-forge/cli/node_modules/@electron-forge/core/dist/util/install-dependencies.js:16:221)
at _throw (/home/XXX/.nvm/versions/node/v8.12.0/lib/node_modules/@electron-forge/cli/node_modules/@electron-forge/core/dist/util/install-dependencies.js:16:455)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)
Hello. I'm facing with error when executing
sudo npm install -g electron-forge
ignoring that and executing
electron-forge import .
give me another error: