1

I'm getting and error trying to install node modules for my application on a new computer:

enter image description here

From what I can see it's failing at trying to install contextify which I guess is a dependency for one of my packages.

I have python installed both in the folder path it says it's looking for and as an environment variable (windows 10).

This is my package file dependencies:

  "devDependencies": {
    "babel-core": "^6.25.0",
    "babel-loader": "^6.4.1",
    "babel-preset-env": "^1.5.2",
    "babel-preset-es2015": "^6.24.1",
    "bootstrap-loader": "^1.0.10",
    "bootstrap-sass": "^3.3.6",
    "crypto-js": "^3.1.5",
    "css-loader": "^0.23.1",
    "datatables.net": "^1.10.10",
    "datatables.net-jqui": "^1.10.10",
    "del": "^0.1.3",
    "event-stream": "^3.3.2",
    "expose-loader": "^0.7.1",
    "file-loader": "^0.8.5",
    "font-awesome-webpack": "0.0.4",
    "gulp": "^3.9.0",
    "gulp-angular-templatecache": "^1.8.0",
    "gulp-autoprefixer": "^3.1.0",
    "gulp-babel": "^6.1.2",
    "gulp-bump": "^1.0.0",
    "gulp-cached": "^1.1.0",
    "gulp-changed": "^1.3.0",
    "gulp-concat": "^2.6.0",
    "gulp-fixmyjs": "1.0.2",
    "gulp-header": "^1.7.1",
    "gulp-htmlmin": "^1.3.0",
    "gulp-install": "^0.6.0",
    "gulp-jscs": "^3.0.2",
    "gulp-jshint": "^2.0.0",
    "gulp-livereload": "^3.8.1",
    "gulp-load-plugins": "^1.1.0",
    "gulp-minify-css": "^1.2.2",
    "gulp-ng-annotate": "^1.1.0",
    "gulp-notify": "^2.2.0",
    "gulp-packer": "^0.1.2",
    "gulp-plumber": "^1.0.1",
    "gulp-preprocess": "^2.0.0",
    "gulp-prompt": "^0.1.2",
    "gulp-rename": "^1.2.2",
    "gulp-s3": "^0.3.0",
    "gulp-sass": "^2.1.1",
    "gulp-size": "^2.0.0",
    "gulp-sourcemaps": "^1.6.0",
    "gulp-strip-debug": "^1.1.0",
    "gulp-uglify": "^1.5.1",
    "gulp-util": "^3.0.7",
    "gulp-watch": "^2.0.0",
    "gulp-webpack": "^1.5.0",
    "gulp-zip": "^3.1.0",
    "html-loader": "^0.4.0",
    "imagemin-jpegtran": "^4.3.2",
    "imagemin-optipng": "^4.3.0",
    "img-loader": "^1.2.2",
    "jquery": "^1.12.1",
    "jshint": "^2.8.0",
    "jshint-html-reporter": "^0.2.4",
    "jshint-stylish": "^2.1.0",
    "less": "^2.5.3",
    "less-loader": "^2.2.2",
    "node-sass": "^3.4.2",
    "open-sans-fontface": "^1.4.0",
    "resolve-url-loader": "^1.4.3",
    "run-sequence": "^1.1.5",
    "sass-loader": "^3.1.2",
    "style-loader": "^0.13.0",
    "url-loader": "^0.5.7",
    "webpack": "^1.15.0",
    "webpack-dev-server": "^1.14.0"
  },
  "dependencies": {
    "angular": "^1.5.3",
    "angular-animate": "^1.5.3",
    "angular-messages": "^1.5.3",
    "angular-resource": "^1.5.3",
    "angular-sanitize": "^1.5.3",
    "angular-ui-bootstrap": "^0.14.3",
    "angular-ui-router": "^0.2.15",
    "animate.css": "^3.4.0",
    "bluebird": "^3.1.1",
    "bootstrap": "^3.3.6",
    "datatables": "^1.10.9",
    "datatables-responsive": "^1.0.7",
    "datatables-tabletools": "^2.2.2",
    "font-awesome": "^4.5.0",
    "gulp-spsave": "^3.0.0",
    "imagemin-gifsicle": "^4.2.0",
    "lodash": "^4.17.4",
    "moment": "^2.10.6",
    "sp-pnp-js": "^2.0.8",
    "spsave": "^3.0.2",
    "toastr": "^2.1.2",
    "ui-select": "^0.16.1"
  }

EDIT: I already have the environment variables set but I set it again just in case as recommended below:

enter image description here

Batman
  • 5,563
  • 18
  • 79
  • 155

1 Answers1

-2

The problem states itself, you need to create a python env variable. You need to use this command to set the python env variable

set PYTHON=thePath

in your case I think it is

set PYTHON=C:\Program Files (x86)\Python36-32\python.exe

this will set the env variable.

Please see this case for more information on how to set env python variable.

Ahmed Can Unbay
  • 2,694
  • 2
  • 16
  • 33
  • I have the environment variable and it doesn't work. I updated the OP to show an image. – Batman Sep 07 '17 at 19:07
  • try it with `""`s containing only the path, and without it. if they don't work try this => `setx PYTHON "thepath"` @Batman – Ahmed Can Unbay Sep 07 '17 at 19:10
  • This isn't the issue, the path to python works fine. If I open any console and run `python` it lunches correctly. – Batman Sep 07 '17 at 19:14
  • also you might have problems with the file name of `Program Files` since it is containing a spacebar key, copy the exe file to some other path, and try to use the same command without `""`s. – Ahmed Can Unbay Sep 07 '17 at 19:14
  • okay but, when you use set command, it *might* return errors if the command contains these `""` so it's not about running python, it's about the set command seeing it – Ahmed Can Unbay Sep 07 '17 at 19:15
  • You're right, I did the set command wrong. But that's still not the issue – Batman Sep 07 '17 at 19:22
  • have you tried these commands? try to reinstall python and node too if you're using earlier versions then reboot, I don't see what the problem is. – Ahmed Can Unbay Sep 07 '17 at 19:31