adopted-ember-addons / ember-electron

:zap: Build, test, compile and package desktop apps with Ember and Electron
https://ember-electron.js.org/
Other
805 stars 109 forks source link

Native compilation step fails if there are no dependencies #131

Closed papakay closed 7 years ago

papakay commented 7 years ago

Hello, please i'm getting this error when trying to package my app with ember electron:package

I got this error Error: ENOENT: no such file or directory, scandir '/Library/WebServer/Documents/spentary-rxstore/tmp/electron-build-tmp/node_modules'

Please see my package.json below

{ "name": "spentary-rxstore", "version": "0.0.0", "description": "Small description for spentary-rxstore goes here", "license": "MIT", "author": "", "directories": { "doc": "doc", "test": "tests" }, "repository": "", "scripts": { "build": "ember build", "start": "ember server", "test": "ember test" }, "devDependencies": { "bcryptjs": "^2.4.0", "broccoli-asset-rev": "^2.4.5", "devtron": "^1.4.0", "electron": "^1.4.15", "electron-packager": "^8.5.1", "electron-rebuild": "^1.5.7", "ember-ajax": "^2.4.1", "ember-browserify": "1.1.13", "ember-cli": "2.10.0", "ember-cli-app-version": "^2.0.0", "ember-cli-babel": "^5.1.7", "ember-cli-dependency-checker": "^1.3.0", "ember-cli-filter-by-query": "1.2.0", "ember-cli-htmlbars": "^1.0.10", "ember-cli-htmlbars-inline-precompile": "^0.3.3", "ember-cli-inject-live-reload": "^1.4.1", "ember-cli-jshint": "^2.0.1", "ember-cli-moment-shim": "3.0.1", "ember-cli-notifications": "4.1.6", "ember-cli-qunit": "^3.0.1", "ember-cli-release": "^0.2.9", "ember-cli-sass": "6.0.0", "ember-cli-sri": "^2.1.0", "ember-cli-test-loader": "^1.1.0", "ember-cli-uglify": "^1.2.0", "ember-data": "^2.10.0", "ember-dialog": "3.0.0", "ember-electron": "^1.12.5", "ember-export-application-global": "^1.0.5", "ember-inputmask": "0.2.2", "ember-inspector": "^2.0.4", "ember-load-initializers": "^0.5.1", "ember-moment": "7.3.0", "ember-pikaday": "2.2.0", "ember-pouch": "4.2.3", "ember-resolver": "^2.0.3", "ember-simple-auth": "1.2.0-beta.1", "ember-validations": "2.0.0-alpha.5", "ember-welcome-page": "^1.0.3", "emberx-file-input": "1.1.1", "liquid-fire": "0.27.0", "loader.js": "^4.0.10" }, "engines": { "node": ">= 0.12.0" }, "private": true, "main": "electron.js", "ember-electron": { "WHAT IS THIS?": "Please see the README.md", "copy-files": [ "electron.js", "package.json", "main/*" ], "name": "Spentary RxStore", "platform": "darwin", "arch": null, "version": "1.4.15", "app-bundle-id": null, "app-category-type": null, "app-copyright": null, "app-version": "v0.1.0", "asar": true, "asar-unpack": null, "asar-unpack-dir": null, "build-version": null, "cache": null, "extend-info": null, "extra-resource": null, "helper-bundle-id": null, "icon": "assets/icons/spentary-rxstore-icon", "ignore": null, "out": null, "osx-sign": { "identity": null, "entitlements": null, "entitlements-inherit": null }, "protocol": [], "protocol-names": [], "win-opts": { "loading-gif": null, "icon-url": "assets/icons/spentary-rxstore-icon", "remote-releases": null, "certificate-file": null, "certificate-password": null, "sign-with-params": null }, "overwrite": null, "prune": null, "strict-ssl": null, "win32metadata": { "CompanyName": "Spentary Ltd", "FileDescription": null, "OriginalFilename": null, "ProductName": "My First App", "InternalName": null } } }

Thank you in advance for your help

felixrieseberg commented 7 years ago

Hey! I think we never considered someone not having any dependencies in production (well done, you!) 😅. Could you confirm my suspicion by installing anything as a dependency (even as small as https://www.npmjs.com/package/left-pad) and trying it again?

papakay commented 7 years ago

Please pardon me for the mistake in in closing and reopening this issue. It was a touch mistake.

@felixrieseberg you are a genius. The solution your provided work. I added a dependency node in my package.json as below

"dependencies": { "left-pad": "^1.1.3" },

Then i ran ember electron:package and it compiled successfully without any error.

Please i only observed that the icon specified as App icon was not used. Please do you have an idea of what could be responsible.

Thank you immensely.

DuBistKomisch commented 7 years ago

Ran into this too while playing around with a brand new ember init app, doing mkdir -p tmp/ember-electron-tmp/node_modules also seems to bypass this issue.

weedgrease commented 7 years ago

Having the same issue when not having any dependencies. Adding a single dependency also worked for me.

anulman commented 7 years ago

This will automatically resolve itself when #129 lands, as it will throw if electron-prebuilt-compile is not a dependency.

Okay with everyone if I close & we track there?