Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed when running make #206

Closed
3 tasks done
freefishz opened this issue Apr 22, 2017 · 12 comments
Closed
3 tasks done

Failed when running make #206

freefishz opened this issue Apr 22, 2017 · 12 comments
Labels
blocked/upstream Issues blocked by upstream bugs maker

Comments

@freefishz
Copy link

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:

Failed with electron-forge make, but succeeded in electron-forge start and electron-forge package

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.

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 +172ms
  electron-forge:runtime-config setting key: verbose to value: false +15ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Resolving Forge Config +0ms
  electron-forge:project-resolver searching for project in: C:\Users\Administrator\electron\projects\spider +0ms
  electron-forge:project-resolver electron-forge compatible package.json found in C:\Users\Administrator\electron\projects\spider\package.json +0ms
  electron-forge:lifecycle Process Succeeded: Resolving Forge Config +16ms
We need to package your application before we can make it
  electron-forge:lifecycle Process Started: Preparing to Package Application for arch: x64 +0ms
  electron-forge:project-resolver searching for project in: C:\Users\Administrator\electron\projects\spider +0ms
  electron-forge:project-resolver electron-forge compatible package.json found in C:\Users\Administrator\electron\projects\spider\package.json +0ms
  electron-forge:packager packaging with options { asar: false,
  overwrite: true,
  afterCopy: [ [Function], [Function], [Function], [Function] ],
  afterExtract: [],
  dir: 'C:\\Users\\Administrator\\electron\\projects\\spider',
  arch: 'x64',
  platform: 'win32',
  out: 'C:\\Users\\Administrator\\electron\\projects\\spider\\out',
  electronVersion: '1.6.2',
  quiet: true } +0ms
  electron-forge:lifecycle Process Succeeded: Preparing to Package Application for arch: x64 +12s
  electron-forge:lifecycle Process Started: Compiling Application +0ms
[BABEL] Note: The code generator has deoptimised the styling of "C:/Users/ADMINI~1/AppData/Local/Temp/electron-packager/win32-x64/spider-win32-x64/resources/app/src/app/mods/echart/echarts.min.js" as it exceeds the max of "500KB".
  electron-forge:lifecycle Process Succeeded: Compiling Application +7s
  electron-forge:lifecycle Process Started: Preparing native dependencies +0ms
  electron-forge:lifecycle Process Succeeded: Preparing native dependencies +453ms
  electron-forge:lifecycle Process Started: Packaging Application +16ms
  electron-forge:lifecycle Process Succeeded: Packaging Application +13s
Making for the following targets:
  electron-forge:lifecycle Process Started: Making for target: squirrel - On platform: win32 - For arch: x64 +15ms
  electron-forge:require-search searching [ '../makers/win32/squirrel.js',
  '../makers/generic/squirrel.js',
  'electron-forge-maker-squirrel',
  'squirrel',
  'C:\\Users\\Administrator\\electron\\projects\\spider\\squirrel',
  'C:\\Users\\Administrator\\electron\\projects\\spider\\node_modules\\squirrel',
  'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\makers\\win32\\squirrel.js',
  'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\makers\\generic\\squirrel.js',
  'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\api\\electron-forge-maker-squirrel',
  'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\api\\squirrel',
  'C:\\Users\\Administrator\\electron\\projects\\spider\\squirrel',
  'C:\\Users\\Administrator\\electron\\projects\\spider\\node_modules\\squirrel',
  'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\api\\makers\\win32\\squirrel.js',
  'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\api\\makers\\generic\\squirrel.js',
  'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\api\\node_modules\\electron-forge-maker-squirrel',
  'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\api\\node_modules\\squirrel',
  'C:\\Users\\Administrator\\electron\\projects\\spider\\squirrel',
  'C:\\Users\\Administrator\\electron\\projects\\spider\\node_modules\\squirrel' ] relative to C:\Users\Administrator\AppData\Roaming\npm\node_modules\electron-forge\dist\api +47ms
  electron-forge:require-search testing ../makers/win32/squirrel.js +0ms
  electron-forge:lifecycle Process Failed: Making for target: squirrel - On platform: win32 - For arch: x64 +2s

An unhandled error has occurred inside Forge:
An error occured while making for target: squirrel
Failed with exit code: 1
Output:
���ڳ��Դӡ�spider.nuspec�����ɳ�������
��·����C:\Users\Administrator\electron\projects\spider\out\spider-win32-x64\resources\app\node_modules\array-differ���ķ��ʱ��ܾ���

Error: Failed with exit code: 1
Output:
���ڳ��Դӡ�spider.nuspec�����ɳ�������
��·����C:\Users\Administrator\electron\projects\spider\out\spider-win32-x64\resources\app\node_modules\array-differ���ķ��ʱ��ܾ���

    at ChildProcess.proc.on.code (C:\Users\Administrator\AppData\Roaming\npm\node_modules\electron-forge\node_modules\.2.5.2@electron-winstaller\lib\spawn-promise.js:62:16)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:886:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

What command line arguments are you passing?

electron-forge make

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

  "forge": {
      "make_targets": {
        "win32": ["squirrel"]
      },
      "electronPackagerConfig": {},
      "electronWinstallerConfig": {
        "name": "spider"
      },
      "electronInstallerDebian": {},
      "electronInstallerRedhat": {},
      "github_repository": {
        "owner": "",
        "name": ""
      },
      "windowsStoreConfig": {
        "packageName": "",
        "name": "spider"
      }
    }

Thanks in advance !

@malept malept added the maker label Apr 24, 2017
@MarshallOfSound
Copy link
Member

Can you post the output of running make with DEBUG set like so

DEBUG=electron-windows-installer*,electron-forge*

@MarshallOfSound MarshallOfSound added the blocked/upstream Issues blocked by upstream bugs label Apr 24, 2017
@freefishz
Copy link
Author

I have fixed this issue by removing and reinstalling "node_modules" with NPM.
So it may be caused with network or NPM during installing dependencies.

Please close this issue.
Thanks anyway.

@malept malept closed this as completed Apr 27, 2017
@malept
Copy link
Member

malept commented Apr 27, 2017

FYI, you should have been able to close this yourself, since you're the issue reporter.

@Lorempn2
Copy link

Lorempn2 commented Aug 2, 2017

Having the exact same issue. Reinstalling does not work.

@ruvenss
Copy link

ruvenss commented Aug 24, 2017

500kb Limit in other file does not allow to compile... WTH??! could you guys put at least 5mb Limit? or remove the limitations.

@malept
Copy link
Member

malept commented Aug 24, 2017

@ruvenss See the response I gave in the issue you filed, #307.

@xenonflash
Copy link

I also facing this problem, and tried to re-install node_modules, but still not work,
any one successfully solved this? how

@sanchezcarlosjr
Copy link

sanchezcarlosjr commented Aug 6, 2019

Hello everyone. I've solved with docker. I used this Windows container: https://hub.docker.com/_/microsoft-windows and an azure pipeline to Continous Delivery

@waghcwb
Copy link

waghcwb commented Sep 10, 2020

I'm having the same issue here. Not sure what is happening, but I found an ugly (temp) solution.

I need to edit this file from node_modules:
node_modules\@electron-forge\core\dist\api\make.js

And comment this line

if (!(await maker.isSupportedOnCurrentPlatform())) {
  throw new Error([`Cannot make for ${platform} and target ${maker.name}: the maker declared `, `that it cannot run on ${process.platform}`].join(''));
}

So my app is packaged with no errors.

@malept
Copy link
Member

malept commented Sep 10, 2020

@waghcwb it would help to know what the actual error is, because it sounds like it can't find a certain binary needed for the maker you're using, for some reason.

@Visiopaja
Copy link

I had to spearately install winstaller for electron.

npm install --save-dev electron-winstaller

@fire332
Copy link

fire332 commented Jun 11, 2024

This also happens when using yarn with nodeLinker not set to node-modules. The package isolation prevents the Maker#isInstalled check from succeeding because it tests by trying to require the module which will never work unless the specified module (electron-winstaller in this case) is added to package.json.

electron-winstaller is currently specified as an optional dependency in @electron-forge/maker-squirrel. I'm not sure if this issue is fixed if @electron-forge/maker-squirrel specifies it as a normal dependency instead but I don't think it makes sense to make electron-winstaller optional anyhow as @electron-forge/maker-squirrel is only applicable on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked/upstream Issues blocked by upstream bugs maker
Projects
None yet
Development

No branches or pull requests

10 participants