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

i run ember-electron:package and get this error #308

Closed 85636682 closed 7 years ago

85636682 commented 7 years ago
An unhandled error has occurred inside Forge:
Cannot find module '/Users/stephen/automobile/tmp/package_task-tmp_path-62bijN2I.tmp/node_modules/electron-compile/lib/cli.js'
Error: Cannot find module '/Users/stephen/automobile/tmp/package_task-tmp_path-62bijN2I.tmp/node_modules/electron-compile/lib/cli.js'
bendemboski commented 7 years ago

It looks like maybe you don't have electron-compile in your package.json dependencies? I'd try re-running the blueprint -- ember g ember-electron and see if that fixes it.

85636682 commented 7 years ago

i try but still get the same errors my package.json


  "devDependencies": {
    "babel-plugin-transform-async-to-generator": "^6.24.1",
    "babel-preset-env": "^1.6.0",
    "babel-preset-react": "^6.24.1",
    "broccoli-asset-rev": "^2.4.5",
    "devtron": "^1.4.0",
    "electron-prebuilt-compile": "1.7.6",
    "ember-ajax": "^3.0.0",
    "ember-cli": "~2.14.2",
    "ember-cli-app-version": "^3.0.0",
    "ember-cli-babel": "^6.3.0",
    "ember-cli-dependency-checker": "^1.3.0",
    "ember-cli-eslint": "^3.0.0",
    "ember-cli-htmlbars": "^2.0.1",
    "ember-cli-htmlbars-inline-precompile": "^0.4.3",
    "ember-cli-inject-live-reload": "^1.4.1",
    "ember-cli-js-cookie": "^0.1.1",
    "ember-cli-moment-shim": "^3.5.0",
    "ember-cli-qunit": "^4.0.0",
    "ember-cli-shims": "^1.1.0",
    "ember-cli-sri": "^2.1.0",
    "ember-cli-uglify": "^1.2.0",
    "ember-data": "~2.14.9",
    "ember-electron": "^2.4.0",
    "ember-export-application-global": "^2.0.0",
    "ember-font-awesome": "^4.0.0-alpha.2",
    "ember-link-action": "0.0.36",
    "ember-load-initializers": "^1.0.0",
    "ember-moment": "^7.4.1",
    "ember-resolver": "^4.0.0",
    "ember-source": "~2.14.1",
    "js-cookie": "^2.1.4",
    "loader.js": "^4.2.3"
  },
  "engines": {
    "node": "^4.5 || 6.* || >= 7.*"
  },
  "private": true,
  "dependencies": {
    "electron-compile": "^6.4.1",
    "electron-protocol-serve": "^1.3.0"
  },

errors

⠇ Building and assembling'instrument' is imported from external module 'ember-data/-debug' but never used
⠹ Building and assemblingWarning: ignoring input sourcemap for vendor/ember/ember.debug.js because ENOENT: no such file or directory, open '/Users/stephen/automobile/tmp/source_map_concat-input_base_path-RbWFQnYd.tmp/vendor/ember/ember.debug.map'
⠼ Building and assemblingWarning: ignoring input sourcemap for vendor/ember/ember-testing.js because ENOENT: no such file or directory, open '/Users/stephen/automobile/tmp/source_map_concat-input_base_path-QNRYMUSA.tmp/vendor/ember/ember-testing.map'
cleaning up...
Built and assembled Electron project successfully. Stored in "/Users/stephen/automobile/tmp/package_task-tmp_path-Y5W4IRQY.tmp".
Packaging Electron project.
✖ Compiling Application

An unhandled error has occurred inside Forge:
Cannot find module '/Users/stephen/automobile/tmp/package_task-tmp_path-Y5W4IRQY.tmp/node_modules/electron-compile/lib/cli.js'
Error: Cannot find module '/Users/stephen/automobile/tmp/package_task-tmp_path-Y5W4IRQY.tmp/node_modules/electron-compile/lib/cli.js'
    at Function.Module._resolveFilename (module.js:472:15)
    at Function.Module._load (module.js:420:25)
    at Module.require (module.js:500:17)
    at require (internal/module.js:20:19)
    at _callee2$ (/Users/stephen/automobile/node_modules/ember-electron/node_modules/electron-forge/dist/util/compile-hook.js:181:36)
    at tryCatch (/Users/stephen/automobile/node_modules/regenerator-runtime/runtime.js:65:40)
    at Generator.invoke [as _invoke] (/Users/stephen/automobile/node_modules/regenerator-runtime/runtime.js:299:22)
    at Generator.prototype.(anonymous function) [as next] (/Users/stephen/automobile/node_modules/regenerator-runtime/runtime.js:117:21)
    at Generator.tryCatcher (/Users/stephen/automobile/node_modules/bluebird/js/release/util.js:16:23)
    at PromiseSpawn._promiseFulfilled (/Users/stephen/automobile/node_modules/bluebird/js/release/generators.js:97:49)
    at /Users/stephen/automobile/node_modules/bluebird/js/release/generators.js:201:15
    at /Users/stephen/automobile/node_modules/ember-electron/node_modules/electron-forge/dist/util/ora-handler.js:70:5
    at F (/Users/stephen/automobile/node_modules/core-js/library/modules/_export.js:35:28)
    at asyncOra (/Users/stephen/automobile/node_modules/ember-electron/node_modules/electron-forge/dist/util/ora-handler.js:69:10)
    at _callee3$ (/Users/stephen/automobile/node_modules/ember-electron/node_modules/electron-forge/dist/util/compile-hook.js:46:45)
    at tryCatch (/Users/stephen/automobile/node_modules/regenerator-runtime/runtime.js:65:40)
✖ Preparing native dependencies

An unhandled error has occurred inside Forge:
ENOENT: no such file or directory, lstat '/private/var/folders/7b/8z5t1ckx7g5brm_51yt99_g80000gn/T/electron-packager/darwin-x64/automobile-darwin-x64/Electron.app/Contents/Resources/app/node_modules'
Error: ENOENT: no such file or directory, lstat '/private/var/folders/7b/8z5t1ckx7g5brm_51yt99_g80000gn/T/electron-packager/darwin-x64/automobile-darwin-x64/Electron.app/Contents/Resources/app/node_modules'
Making Electron project.
85636682 commented 7 years ago

i think it can not

/Users/stephen/automobile/tmp/package_task-tmp_path-qKQSAOXf.tmp
davideschiera commented 7 years ago

I'm having a very similar issue by running ember electron:make. It looks like node_modules folder in tmp folder does not include all the packages. I managed to force the command to work fine by replacing https://github.com/felixrieseberg/ember-electron/blob/5c867a77464dcc875f8e35b9b2d30fddd60a2adf/lib/tasks/assemble.js#L70 with return 'npm install';. Unfortunately I didn't find any way to force this behavior via parameters.

I also tried this on a brand new testing app. Interesting note: It was working until I re-installed all npm dependencies via rm -rf node_modules && npm install from root (few hours ago). Maybe it's related to some dependencies updated recently that conflict with ember-electron somehow?

Here is the complete output:

Davides-MacBook-Pro:test-ember-electron davide$ ember electron:make --platform=darwin

"ember-welcome-page" was detected in your devDependencies!
Please note that this addon only works in development environment
and will not render in production mode. It is safe to uninstall
this addon once you removed the {{welcome-page}} template tag.

'instrument' is imported from external module 'ember-data/-debug' but never used
Warning: ignoring input sourcemap for vendor/ember/ember.debug.js because ENOENT: no such file or directory, open '/Users/davide/Documents/test-ember-electron/tmp/source_map_concat-input_base_path-ZZJRqsiq.tmp/vendor/ember/ember.debug.map'
Warning: ignoring input sourcemap for vendor/ember/ember-testing.js because ENOENT: no such file or directory, open '/Users/davide/Documents/test-ember-electron/tmp/source_map_concat-input_base_path-gyiq7EZR.tmp/vendor/ember/ember-testing.map'
cleaning up...
Built and assembled Electron project successfully. Stored in "/Users/davide/Documents/test-ember-electron/tmp/package_task-tmp_path-NWdNzpks.tmp".
Packaging Electron project.
✖ Compiling Application

An unhandled error has occurred inside Forge:
Cannot find module '/Users/davide/Documents/test-ember-electron/tmp/package_task-tmp_path-NWdNzpks.tmp/node_modules/electron-compile/lib/cli.js'
Error: Cannot find module '/Users/davide/Documents/test-ember-electron/tmp/package_task-tmp_path-NWdNzpks.tmp/node_modules/electron-compile/lib/cli.js'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at _callee2$ (/Users/davide/Documents/test-ember-electron/node_modules/electron-forge/dist/util/compile-hook.js:181:36)
    at tryCatch (/Users/davide/Documents/test-ember-electron/node_modules/regenerator-runtime/runtime.js:65:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/davide/Documents/test-ember-electron/node_modules/regenerator-runtime/runtime.js:299:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Users/davide/Documents/test-ember-electron/node_modules/regenerator-runtime/runtime.js:117:21)
    at GeneratorFunctionPrototype.tryCatcher (/Users/davide/Documents/test-ember-electron/node_modules/bluebird/js/release/util.js:16:23)
    at PromiseSpawn._promiseFulfilled (/Users/davide/Documents/test-ember-electron/node_modules/bluebird/js/release/generators.js:97:49)
    at /Users/davide/Documents/test-ember-electron/node_modules/bluebird/js/release/generators.js:201:15
    at /Users/davide/Documents/test-ember-electron/node_modules/electron-forge/dist/util/ora-handler.js:70:5
    at Promise.F (/Users/davide/Documents/test-ember-electron/node_modules/core-js/library/modules/_export.js:35:28)
    at asyncOra (/Users/davide/Documents/test-ember-electron/node_modules/electron-forge/dist/util/ora-handler.js:69:10)
    at _callee3$ (/Users/davide/Documents/test-ember-electron/node_modules/electron-forge/dist/util/compile-hook.js:46:45)
    at tryCatch (/Users/davide/Documents/test-ember-electron/node_modules/regenerator-runtime/runtime.js:65:40)
✖ Preparing native dependencies

An unhandled error has occurred inside Forge:
ENOENT: no such file or directory, lstat '/private/var/folders/hx/8sjhky3x2f39ms2x95zd8yc40000gn/T/electron-packager/darwin-x64/test-ember-electron-darwin-x64/Electron.app/Contents/Resources/app/node_modules'
Error: ENOENT: no such file or directory, lstat '/private/var/folders/hx/8sjhky3x2f39ms2x95zd8yc40000gn/T/electron-packager/darwin-x64/test-ember-electron-darwin-x64/Electron.app/Contents/Resources/app/node_modules'
    at Error (native)
Making Electron project.
xn commented 7 years ago

Same. Was working till I had to blow out npm.

xn commented 7 years ago

And needless to say, the file size has ballooned considerably.