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

Strange error 'cannot find package.json' #441

Closed
3 tasks done
okdistribute opened this issue Feb 23, 2018 · 2 comments
Closed
3 tasks done

Strange error 'cannot find package.json' #441

okdistribute opened this issue Feb 23, 2018 · 2 comments

Comments

@okdistribute
Copy link

okdistribute commented Feb 23, 2018

  • 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:

Using electron-forge with the native dep level on node 8.9.4

The same repository works for my colleague on linux. I'm on Mac OSX

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.

$ DEBUG=electron-forge:* npm start

> mapfilter-desktop@0.5.0 start /Users/karissa/node_modules/mapfilter-desktop
> electron-forge start

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 +284ms
  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:lifecycle Process Started: Locating Application +0ms
  electron-forge:project-resolver searching for project in: /Users/karissa/node_modules/mapfilter-desktop +0ms
  electron-forge:project-resolver electron-forge compatible package.json found in /Users/karissa/node_modules/mapfilter-desktop/package.json +5ms
  electron-forge:lifecycle Process Succeeded: Locating Application +6ms
  electron-forge:lifecycle Process Started: Preparing native dependencies +5ms
  electron-forge:lifecycle Process Succeeded: Preparing native dependencies +442ms
  electron-forge:hook could not find hook: generateAssets +0ms
  electron-forge:lifecycle Process Started: Launching Application +2ms
  electron-forge:lifecycle Process Succeeded: Launching Application +4ms
App threw an error during load
Error: Can't find package.json
    at findPackageJson (/Users/karissa/node_modules/mapfilter-desktop/node_modules/electron-prebuilt-compile/lib/es6-init.js:19:11)
    at findPackageJson (/Users/karissa/node_modules/mapfilter-desktop/node_modules/electron-prebuilt-compile/lib/es6-init.js:29:10)
    at findPackageJson (/Users/karissa/node_modules/mapfilter-desktop/node_modules/electron-prebuilt-compile/lib/es6-init.js:29:10)
    at findPackageJson (/Users/karissa/node_modules/mapfilter-desktop/node_modules/electron-prebuilt-compile/lib/es6-init.js:29:10)
    at findPackageJson (/Users/karissa/node_modules/mapfilter-desktop/node_modules/electron-prebuilt-compile/lib/es6-init.js:29:10)
    at main (/Users/karissa/node_modules/mapfilter-desktop/node_modules/electron-prebuilt-compile/lib/es6-init.js:44:23)
    at Object.<anonymous> (/Users/karissa/node_modules/mapfilter-desktop/node_modules/electron-prebuilt-compile/lib/es6-init.js:59:1)
    at Object.<anonymous> (/Users/karissa/node_modules/mapfilter-desktop/node_modules/electron-prebuilt-compile/lib/es6-init.js:61:3)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)

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

  "config": {
    "forge": {
      "make_targets": {
        "win32": [
          "squirrel"
        ],
        "darwin": [
          "zip",
          "dmg"
        ],
        "linux": [
          "deb",
          "rpm"
        ]
      },
      "electronPackagerConfig": {
        "asar": true,
        "win32metadata": {
          "CompanyName": "TiziiTizii"
        }
      },
      "electronWinstallerConfig": {},
      "electronInstallerDebian": {},
      "electronInstallerRedhat": {},
      "github_repository": {
        "owner": "digidem",
        "name": "mapfilter-desktop",
        "draft": false
      },
      "windowsStoreConfig": {
        "packageName": "",
        "name": "TiziiTizii"
      }
    }
  },

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.

https://github.com/digidem/mapfilter-desktop

@malept
Copy link
Member

malept commented Feb 23, 2018

Try cloning a new repository of it somewhere else. That's bizarre.

@okdistribute
Copy link
Author

Yes, this worked -- I had originally cloned it in my ~/node_modules folder, which is where I have all of my node projects because then I can easily swap out dependencies. Cloning in a bare folder without this (e.g., ~/dev) then worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants