5

I'm trying to get working my project based on EmberJS on another computer. I've cloned the repo, and when I'm trying to run npm install it hangs on extracting Faker package.

extract:faker: verb gentlyRm don't care about contents; nuking C:\Users\Babanov.Viktor\PhpstormProjects\IdeaPlannerFront\node_modules.staging\faker-c7ff04ca\node_modules

I tried to wait for a couple of hours, and nothing changed. Removing of the .stage directory didn't give any effect.

Here are my package.json contents:

{
  "name": "idea-planner-ember",
  "version": "0.0.0",
  "description": "Small description for idea-planner-ember goes here",
  "license": "MIT",
  "author": "",
  "directories": {
    "doc": "doc",
    "test": "tests"
  },
  "repository": "",
  "scripts": {
    "build": "ember build",
    "start": "ember server",
    "test": "ember test"
  },
  "devDependencies": {
    "bootstrap": "^3.3.7",
    "broccoli-asset-rev": "^2.4.5",
    "ember-ajax": "^3.0.0",
    "ember-cli": "^2.13.1",
    "ember-cli-app-version": "^3.0.0",
    "ember-cli-babel": "^6.0.0",
    "ember-cli-dependency-checker": "^1.3.0",
    "ember-cli-eslint": "^3.0.0",
    "ember-cli-htmlbars": "^1.1.1",
    "ember-cli-htmlbars-inline-precompile": "^0.4.0",
    "ember-cli-inject-live-reload": "^1.4.1",
    "ember-cli-mirage": "^0.3.1",
    "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.13.0",
    "ember-export-application-global": "^2.0.0",
    "ember-load-initializers": "^1.0.0",
    "ember-resolver": "^4.0.0",
    "ember-source": "~2.13.0",
    "ember-welcome-page": "^3.0.0",
    "loader.js": "^4.2.3"
  },
  "engines": {
    "node": ">= 4"
  },
  "private": true,
  "dependencies": {
    "ember-bootstrap": "^1.0.0-alpha.12",
    "ember-simple-auth": "^1.3.0",
    "ember-cli-flash": "^1.4.2",
    "ember-cli-sentry": "^2.4.4"
  }
}

Node.js 6.11.2

npm 5.3.0

UPD.

I deleted node_modules directory, installed phantomjs-prebuilt, changed ember-cli-mirage version to the latest stable for me (0.3.1) and explicitly installed faker with npm i --save-dev faker@3.0.0 (this version is required by ember-cli-mirage). Now when npm i npm doesn't try to install faker once more. But the error is still here. npm hangs on

extract:core-js: sill extract babel-plugin-eval@1.0.1

I guess it is the next plugin to extract after the faker.

Viktor
  • 161
  • 1
  • 2
  • 13

2 Answers2

5
  • ember-cli is having another dependency called ember-cli-mirage which is dependant on faker.
  • On previous machine, check what versions are there for node, npm, ember-cli, bower and phantomjs-prebuilt.
  • Either you can use same versions. Or try clearing cache and updating only npm using:

    npm cache clean
    npm i -g npm
    

Updated Answer

Now that you are receiving following error:

extract:core-js: sill extract babel-plugin-eval@1.0.1

I dig up more and found that your loader.js@4.2.3 is using babel-core@5.x version which in turn uses babel-plugin-eval@1.0.1. If you go to npm@babel-eval-plugin, you will find there github repository link which no longer exist and move to npm@babel-plugin-transform-eval. Hence, this issue might be occurring.

Overall, your ember-cli version 2.13.x is having some not supporting libraries. I will suggest you to upgrade your ember-cli version as mentioned in there release documentation.

npm install -g ember-cli@2.15.1 rimraf
rimraf node_modules dist tmp
npm install --save-dev ember-cli@2.15.1
npm install
ember init

I will also suggest to re-clone your repository on fresh location and try these instructions their.

Sumit Ramteke
  • 1,487
  • 1
  • 16
  • 39
  • The previous machine is too far away now. I have the latest (5.3.0) npm. – Viktor Sep 01 '17 at 13:10
  • Node js version is 6.11.2 (last stable) – Viktor Sep 01 '17 at 13:40
  • I am not sure if latest latest npm 5.3 supports with node 6.11 LTS or not. But if you want to update Node as well, then go through https://stackoverflow.com/q/23940172/2443988 – Sumit Ramteke Sep 04 '17 at 11:43
  • 1
    I tryed this with npm v5.4.1 and `--no-optional` key. Everything is working now. I don't know what made the final sence because I couldn't do the same with ember-cli 2.15 and npm v5.3 without `--no-optional` key few days ago. But I'm very grateful for your help. – Viktor Sep 08 '17 at 07:51
1

I don't know exactly why, but I had the same issue and when changing "something" in my package.json (not a dependency update, just i.e. my package.json version) the npm install worked again.

adrai
  • 2,495
  • 1
  • 15
  • 18