All Case Studies Design Development Interviews Our Way Project Management

How To Fix EACCESS Error During Ember CLI Deployment

Problem

Ember CLI deploy fails on running:

/usr/bin/env ./node_modules/ember-cli/bin/ember build --environment smoke --output-path dist/

 

Example log:

DEBUG [c38ba40d] Command: cd /home/fltctrl-front-smoke/app/releases/20150908110333 && /usr/bin/env ./node_modules/ember-cli/bin/ember build --environment smoke --output-path dist/

DEBUG [c38ba40d] version: 1.13.8

DEBUG [c38ba40d] Could not find watchman, falling back to NodeWatcher for file system events.

DEBUG [c38ba40d] Visit http://www.ember-cli.com/user-guide/#watchman for more info.

DEBUG [c38ba40d] Building

DEBUG [c38ba40d] bootstrap-sassy config: all JS enabled, glphicons enabled

DEBUG [c38ba40d] Building.

DEBUG [c38ba40d] Build failed.

DEBUG [c38ba40d] File: modules/ember-cli-app-version/components/app-version.js

DEBUG [c38ba40d] EACCES, mkdir '/tmp/async-disk-cache/2d1fa0700ad69dcddfe7f081bbf11052'

DEBUG [c38ba40d] Error: EACCES, mkdir '/tmp/async-disk-cache/2d1fa0700ad69dcddfe7f081bbf11052'

DEBUG [c38ba40d] at Error (native)

DEBUG [c38ba40d]

(Backtrace restricted to imported tasks)

cap aborted!

SSHKit::Runner::ExecuteError: Exception while executing as fltctrl-front-smoke@fltctrl.smoke.devguru.co: ./node_modules/ember-cli/bin/ember exit status: 1

./node_modules/ember-cli/bin/ember stdout: Nothing written

./node_modules/ember-cli/bin/ember stderr: Nothing written


SSHKit::Command::Failed: ./node_modules/ember-cli/bin/ember exit status: 1

./node_modules/ember-cli/bin/ember stdout: Nothing written

./node_modules/ember-cli/bin/ember stderr: Nothing written

 

Solution

Ember and/or npm are using the same global /tmp directory. When two apps have the same lib, there may be a situation where current user will not have rights to overwrite new folder or file.

 

You have to set TEMP env variable for user. In your deploy.rb file add:

set :default_env, {
  'TEMP' => '/tmp/{app_name}_tmp'
}
Follow Netguru
Join our Newsletter

READ ALSO FROM Ember-CLI
Read also
Need a successful project?
Estimate project or contact us