question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

You can not override the dir

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

I read that “you can not override the dir” of electron-packager. Currently, my build system creates a dist folder with the appropriate package.json, main.js and renderer.js files generated from typescript files, etc.

Is it not possible to have electron-forge configured to the appropriate path of the built project?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
prodigy7commented, Aug 8, 2019

Same problem here too!

My package.json:

{
  "name": "project",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint",
    "start": "electron-forge start",
    "package": "electron-forge package",
    "make": "electron-forge make"
  },
  "dependencies": {
    "axios": "^0.19.0",
    "core-js": "^2.6.5",
    "electron-compile": "^6.4.4",
    "electron-squirrel-startup": "^1.0.0",
    "vue": "^2.6.10",
    "vue-router": "^3.1.1",
    "vuex": "^3.1.1"
  },
  "devDependencies": {
    "@dongido/vue-viaudio": "^0.3.2",
    "@vue/cli-plugin-babel": "^3.10.0",
    "@vue/cli-plugin-eslint": "^3.10.0",
    "@vue/cli-service": "^3.10.0",
    "babel-eslint": "^10.0.1",
    "babel-plugin-transform-async-to-generator": "^6.24.1",
    "babel-preset-env": "^1.7.0",
    "babel-preset-react": "^6.24.1",
    "compass-mixins": "^0.12.10",
    "electron-forge": "^5.2.4",
    "electron-prebuilt-compile": "4.0.0",
    "eslint": "^5.16.0",
    "eslint-plugin-vue": "^5.0.0",
    "lodash": "^4.17.15",
    "node-sass": "^4.12.0",
    "sass-loader": "^7.1.0",
    "vue-template-compiler": "^2.6.10"
  },
  "eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/essential",
      "eslint:recommended"
    ],
    "rules": {},
    "parserOptions": {
      "parser": "babel-eslint"
    }
  },
  "postcss": {
    "plugins": {
      "autoprefixer": {}
    }
  },
  "browserslist": [
    "> 1%",
    "last 2 versions"
  ],
  "main": "./dist/electron.js",
  "config": {
    "forge": "./forge.config.js"
  }
}

My forge.config.js:

module.exports = {
  "make_targets": {
    "win32": [
      "squirrel"
    ],
    "darwin": [
      "zip"
    ],
    "linux": [
      "deb",
      "rpm"
    ]
  },
  "electronPackagerConfig": {
    "asar": false,
    "dir": "./dist",
    "packageManager": "yarn",
    "ignore": ["^/src", "^/public"]
  },
  "electronWinstallerConfig": {
    "name": "project"
  },
  "electronInstallerDebian": {},
  "electronInstallerRedhat": {},
  "github_repository": {
    "owner": "",
    "name": ""
  },
  "windowsStoreConfig": {
    "packageName": "",
    "name": "project"
  }
}

“dir” as root for generate package isn’t taken, only “ignore” is working. I want that ./dist is the root for the generated package. electron-packager directly is working but should not be the solution in my opinion. Next problem is, that asar file is generated everytime - i dont want it. Also tried rename section electronPackagerConfig to packagerConfig but does not change anything, only that every key/value is ignored.

Electron Forge version used: 5.2.4

0reactions
rynzcommented, Jun 14, 2019

Nope 😦 It’s okay I’ll use electron-packager directly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

You can not override the dir · Issue #934 · electron/forge · GitHub
I read that "you can not override the dir" of electron-packager . Currently, my build system creates a dist folder with the appropriate ......
Read more >
cp: cannot overwrite directory with non-directory - Super User
CASE 1 You get this error when you try to copy a file (source) that has the same name of a directory (destination)....
Read more >
mv: cannot overwrite directory with non-directory
You can 't force mv to overwrite a directory with a file with the same name. You'll need to remove that file before...
Read more >
Overwrite an existing directory? - command line - Ask Ubuntu
Just creates the directory ~/Desktop/foo if it does not already exist. ... No, there is no single command to do what you are...
Read more >
How do I override rw-r--r-- root/wheel for a all files in a directory?
This overcomes most permissions that cause the override prompt. There can still be times when permissions are set to prevent root accidentally ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found