Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarn install doesn't work on windows 10 #10

Open
findjonmos opened this issue Mar 2, 2018 · 26 comments
Open

yarn install doesn't work on windows 10 #10

findjonmos opened this issue Mar 2, 2018 · 26 comments

Comments

@findjonmos
Copy link

I basically get the below errors, I have hunted around the web to try and find out specifically whats wrong but at a loss for the moment. Paid a lot for the course and cant get started

$ yarn install
yarn install v1.5.1
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.0.15: The platform "win32" is incompatible with this module.
info "fsevents@1.0.15" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/1] ⠄ node-sass: checking for Python executable "python" in the PATH
[-/1] ⠄ waiting...
[-/1] ⡀ waiting...
[-/1] ⡀ waiting...
error An unexpected error occurred: "C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules
ode-sass: Command failed.
Exit code: 1
Command: C:\WINDOWS\system32\cmd.exe
Arguments: /d /s /c node scripts/build.js
Directory: C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules
ode-sass
Output:
Building: C:\Program Files
odejs
ode.exe C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules
ode-gyp\bin
ode-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ 'C:\\Program Files\
odejs\
ode.exe',
gyp verb cli 'C:\\Users\\jmosley\\Documents\\Development\\angular-fundamentals-seed\
ode_modules\
ode-gyp\\bin\
ode-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using node-gyp@3.4.0
gyp info using node@8.9.4 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb which failed Error: not found: python2
gyp verb which failed at getNotFoundError (C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\which\which.js:13:12)
gyp verb which failed at F (C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\which\which.js:68:19)
gyp verb which failed at E (C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\which\which.js:80:29)
gyp verb which failed at C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\which\which.js:89:16
gyp verb which failed at C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\isexe\index.js:44:5
gyp verb which failed at C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\isexe\windows.js:29:5
gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb which failed python2 { Error: not found: python2
gyp verb which failed at getNotFoundError (C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\which\which.js:13:12)
gyp verb which failed at F (C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\which\which.js:68:19)
gyp verb which failed at E (C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\which\which.js:80:29)
gyp verb which failed at C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\which\which.js:89:16
gyp verb which failed at C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\isexe\index.js:44:5
gyp verb which failed at C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\isexe\windows.js:29:5
gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21) code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb which failed Error: not found: python
gyp verb which failed at getNotFoundError (C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\which\which.js:13:12)
gyp verb which failed at F (C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\which\which.js:68:19)
gyp verb which failed at E (C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\which\which.js:80:29)
gyp verb which failed at C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\which\which.js:89:16
gyp verb which failed at C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\isexe\index.js:44:5
gyp verb which failed at C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\isexe\windows.js:29:5
gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb which failed python { Error: not found: python
gyp verb which failed at getNotFoundError (C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\which\which.js:13:12)
gyp verb which failed at F (C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\which\which.js:68:19)
gyp verb which failed at E (C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\which\which.js:80:29)
gyp verb which failed at C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\which\which.js:89:16
gyp verb which failed at C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\isexe\index.js:44:5
gyp verb which failed at C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\isexe\windows.js:29:5
gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21) code: 'ENOENT' }
gyp verb could not find "python". checking python launcher
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules
ode-gyp\lib\configure.js:449:14)
gyp ERR! stack at C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules
ode-gyp\lib\configure.js:404:11
gyp ERR! stack at C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\
odejs\
ode.exe" "C:\\Users\\jmosley\\Documents\\Development\\angular-fundamentals-seed\
ode_modules\
ode-gyp\\bin\
ode-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\jmosley\Documents\Development\angular-fundamentals-seed
ode_modules
ode-sass
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.4.0

@toddmotto
Copy link
Member

toddmotto commented Mar 2, 2018 via email

@findjonmos
Copy link
Author

Wow! Thanks for the super fast response Todd. I will also test and see

@toddmotto
Copy link
Member

toddmotto commented Mar 2, 2018 via email

@findjonmos
Copy link
Author

Brill! Thanks Todd :)

@findjonmos
Copy link
Author

It seems like your thinking on the issue was spot on Todd! I dropped back a whole version (node 7.10.1) and all works.
I could probably try going up a few versions but I'm too keen to crack on with learning for now :)

@toddmotto
Copy link
Member

Someone else has confirmed this - I've added a temporary note to that Installation video lesson for others - will check out what we need to fix this for users. Will keep the issue open! :)

@StrangeCargo74
Copy link

StrangeCargo74 commented Mar 23, 2018

I had this problem. Starting the course and coming crashing to a halt is not a good experience! For me, changing my node version wasn't an option.

I think the install needed a pre-built package (or something) that wasn't available, and so tried to rebuild it. That failed because node-gyp and its prerequisites were not installed. I think.

So, with elevated privileges I installed

npm install --global --production windows-build-tools

and then i did

npm install --global node-gyp

and then added python to my environment variables:

set PYTHON "%USERPROFILE%.windows-build-tools\python27\python.exe"

and then the yarn install worked.

..bit of a faff tho!

@zaheer-d
Copy link

zaheer-d commented Mar 27, 2018

this worked for me. only had to change this line set PYTHON "%USERPROFILE%.windows-build-tools\python27\python.exe" -> set PYTHON "%USERPROFILE%\.windows-build-tools\python27\python.exe" notice the "\" after %USERPROFILE%

@mjangir
Copy link

mjangir commented Apr 12, 2018

I had the same problem and found one easy solution without degrading my node version.

  1. Go to python download page and install python 2.7 from the downloaded installer.

  2. Then open the command prompt with administrator and type the following
    npm install --global --production windows-build-tools

  3. Then run npm config set msvs_version 2015 --global

Close all cmd instances and run npm install again in your project and you are good to go.

@sanpan1234
Copy link

I am facing the same issue trying to yarn install. It's a lot of hoops to go through just to get the base project running. Installing ye-olde legacy version of Python? really??

@Braybrookr
Copy link

Braybrookr commented Apr 22, 2018

I have messed around trying to get this up and running. My seed project now builds but when i open localhost:4000 there is no Hello!. It is just a blank white screen.

--edit: got my hello to finally appear. re-did everything from start with both 7.10 and windows-build-tools. Also used 2.7rc15 python.

for anyone else having issues .

@sanpan1234
Copy link

Just created my own base project using CLI. The only downside is I need to now run the json-server on a separate port but that's easier than struggling with this.

@tayelno
Copy link

tayelno commented Apr 29, 2018

try my solution here #11

Here is my machine settings, High Sierra v10.13.4 , Darwin x64.

$ node -v
v10.0.0

$ npm -v
5.6.0

$ yarn -v
1.6.0
So what I did was simple, just remove the locked dev-dependencies of node-sass and sass-loader from package.json then simply run:

yarn add node-sass sass-loader --dev
fixed everything for me.

here check my fork of the project, this commit shows the diff in my package.json

dependencies fix

I hope this fix it for you as well.

@percipio
Copy link

percipio commented May 2, 2018

Awesome, this worked for me!

@smayuran81
Copy link

Hey todd

I am trying to install this locally get the following error, is this enything to do with node version

Project "F:\Development Environment\Angular\ultimateAngular\angular-fundamentals-seed\node_modules\node-sass\build\binding.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Release|x64".
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [F:\Development Environment\Angular\ultimateAngular\angular-fundamentals-seed\node_modules\node-sass\build\binding.sln]
Done Building Project "F:\Development Environment\Angular\ultimateAngular\angular-fundamentals-seed\node_modules\node-sass\build\binding.sln" (default targets) -- FAILED.

Build FAILED.

"F:\Development Environment\Angular\ultimateAngular\angular-fundamentals-seed\node_modules\node-sass\build\binding.sln" (default target) (1) ->
(src\libsass target) ->
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [F:\Development Environment\Angular\ultimateAngular\angular-fundamentals-seed\node_modules\node-sass\build\binding.sln]

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:00.45
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (F:\Development Environment\Angular\ultimateAngular\angular-fundamentals-seed\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\Program Files\nodejs\node.exe" "F:\Development Environment\Angular\ultimateAngular\angular-fundamentals-seed\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd F:\Development Environment\Angular\ultimateAngular\angular-fundamentals-seed\node_modules\node-sass
gyp ERR! node -v v8.9.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
Build failed with error code: 1
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

@smayuran81
Copy link

following StrangeCargo74 from above worked for me

@eakoning
Copy link

eakoning commented Jun 6, 2018

I just installed Node v8.11.2 (with npm v6.1.0) and did a yarn add node-sass@4.5.3. Now yarn install works.

@omarzahidwavelet
Copy link

omarzahidwavelet commented Jun 7, 2018

Thanks @eakoning
Your method worked. Why did it worked though? I mean what was wrong before. I don't get it.
I am still getting this warning though:
sass-loader@4.0.2 has incorrect peer dependency node-sass@3.4.2

But it is compiling and everything is working.

@eakoning
Copy link

eakoning commented Jun 8, 2018

@omarzahidwavelet I found this Stackoverflow post indicating there's a compatibility issue between certain versions of node and node-sass.

@omarzahidwavelet
Copy link

Thanks @eakoning,
Cheers.

@jatinkhimani
Copy link

Hi @toddmotto,
I am facing this below issue while trying to start the app by "yarn start" command.
Please let me know some solution to run the application.

image

@markbell2410
Copy link

markbell2410 commented Oct 27, 2018

This worked @StrangeCargo74 - Just add a backslash after %USERPROFILE%

Remove the node_modules folder and re-run yarn

Original Post

I had this problem. Starting the course and coming crashing to a halt is not a good experience! For me, changing my node version wasn't an option.

I think the install needed a pre-built package (or something) that wasn't available, and so tried to rebuild it. That failed because node-gyp and its prerequisites were not installed. I think.

So, with elevated privileges I installed

npm install --global --production windows-build-tools

and then i did

npm install --global node-gyp

and then added python to my environment variables:

set PYTHON "%USERPROFILE%.windows-build-tools\python27\python.exe"

and then the yarn install worked.

..bit of a faff tho!

@markbell2410
Copy link

markbell2410 commented Oct 27, 2018

That's normal. It's a single page application so you would handle the 404 in the app

Original Post

I am facing this below issue while trying to start the app by "yarn start" command.
Please let me know some solution to run the application.

image

@nick20201
Copy link

I had the issue
Downloading binary from https://github.com/sass/node-sass/releases/download/v3.13.0/win32-x64-72_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v3.13.0/win32-x64-72_binding.node":
HTTP error 404 Not Found

The fix is to change node-sass to the latest version: "4.14.0"
image

@ghost
Copy link

ghost commented Jun 22, 2021

I had the same issues with my Windows10.

  1. I was running node-v16.3.0-x64.
  2. I uninstalled it,
  3. Then installed a previous (but supported) version: node-v12.22.1-x64.
  4. Reinstalled npm at the command line: npm install -g npm
  5. Which gave me the npm version 7.18.1
  6. Finally, I followed the setup instructions to install yarn: npm install -g yarn
    Of course I was able to issue my project commands of 'yarn install' and 'yarn start'...
    Everything Worked!!! Hooray!!!

@kachiuli
Copy link

kachiuli commented Jul 18, 2021

Just do the following in package.json before yarn install:

delete the line "node-sass": "^4.9.0",
add the line "sass": "^1.35.2",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.