PartsUnlimited: "Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (57)"

Title

Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (57)

Functional impact

Results in solution failing to build.

Minimal repro steps

Following directions from here under the “Set up your machine” and “Get the source code”.

  1. Installed Visual Studio 2017 (enterprise).
  2. Install Azure Power Shell (irrelevant for this issue)
  3. Install NodeJS (8.9.4 LTS rather than 6.11.3 LTS that the article mentioned)
  4. Install bower and grunt.
  5. Clone source code from PartsUnlimited
  6. Build solution

Expected result

Successful build.

Actual result

Build failed with error message - “Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (57)”

Further technical details

Running a Windows 10 VM in Azure. Located this issue which indicated to update the gulp-sass version to 3.1.0. When I did a search of the solution, “gulp-sass” was only in the readme. But I did notice that npm install node-sass did result in a couple warnings. Namely that it could not find c:\repos\PartsUnlimited\package.json.

c:\repos\PartsUnlimited>npm install
npm WARN saveError ENOENT: no such file or directory, open 'c:\repos\PartsUnlimited\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'c:\repos\PartsUnlimited\package.json'
npm WARN PartsUnlimited No description
npm WARN PartsUnlimited No repository field.
npm WARN PartsUnlimited No README data
npm WARN PartsUnlimited No license field.

up to date in 1.344s

c:\repos\PartsUnlimited>npm --version
5.6.0

c:\repos\PartsUnlimited>node --version
v8.9.4

I did also go through the git clean -fdx step as well to no avail.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 33 (1 by maintainers)

Commits related to this issue

Most upvoted comments

That worked for me:

npm --depth 9999 update
npm rebuild node-sass

With “yarn add node-sass” worked for me

@eamonnk Thank you! I can now build and debug the solution.

What I did:

  1. Followed the directions on the updated page (“PandP”). That has better instructions and does, in fact, say NOT to use NodeJS 8x.
  2. Uninstalled NodeJS 8x
  3. Installed NodeJS 6.12.3
  4. Cloned solution again to a different repository.
  5. Ran npm rebuild node-sass due to error (the link has info about the error message).
  6. Build solution. All is now good.

This issue is resolved. Thanks again!

That worked for me:

npm --depth 9999 update
npm rebuild node-sass

Thanks, this works for me 😃

Hi

Can you try open up a cmd or Powershell window as administrator, go to the repo where the PartsUnlimitedWebsite src folder is located i.e. C:<repository path>\PartsUnlimited\src\PartsUnlimitedWebsite then run the below command and try again to build the solution.

npm rebuild node-sass

If you still get errors, check the version of node.js installed, if its not v6 but ver 8x, you could uninstall the 8x version thats currently installed and install ver 6.12.3 from the node.js LTS schedule page. Then try build the solution again.

Theres also an updated page available for this as well, https://microsoft.github.io/PartsUnlimited/pandp/200.1x-PandP-PUsetupwithVS2017.html. which has more details then the page you’re currently looking at. It has a bit more detail for errrors which might help.

If its still not building after trying those things let us know and will have another look.

Thanks, Eamonn

npm --depth 9999 update npm rebuild node-sass

This also worked for me!

That worked for me:

npm --depth 9999 update
npm rebuild node-sass

Dosent work for me. She still block and dont move …

That worked for me:

npm --depth 9999 update
npm rebuild node-sass

This also worked for me! Thanks a lot, you saved my day !

This shows that the version of node-sass you are trying to run is not compatible with the version of node installed. So you need to run npm rebuild node-sass and if this does not work, you should run the following command npm uninstall node-sass && npm install node-sass (with -g if your node-sass installed globally)

remove node_modules folder run npm i

In case someone else has problem with Grunt Task Runner after following all the direction above. Please see this link https://developercommunity.visualstudio.com/content/problem/314581/gulpfilejs-fails-in-task-runner-in-visual-studio-2.html . Basically do this go to Tools -> Options -> Projects and Solutions -> Web Package Management -> External Web Tools and move the $(PATH) entry above $(VSInstalledExternalTools). Restart VS 2017, and voila grunt task runner no longer using the wrong version of Node. It would seem that task runner will run the latest version of Node even if you install Node 6. Fixed everything for me. PS: you will still need to rebuild node-sass

Result of task runner - Grunt C:\edx\Repos\PartsUnlimited\src\PartsUnlimitedWebsite> cmd.exe /c grunt -b “C:\edx\Repos\PartsUnlimited\src\PartsUnlimitedWebsite” --gruntfile “C:\edx\Repos\PartsUnlimited\src\PartsUnlimitedWebsite\Gruntfile.js” bower --color Running “bower:install” (bower) task Cleaned target dir C:\edx\Repos\PartsUnlimited\src\PartsUnlimitedWebsite\wwwroot\lib Installed bower packages Copied packages to C:\edx\Repos\PartsUnlimited\src\PartsUnlimitedWebsite\wwwroot\lib Done. Process terminated with code 0.

I am using node 12.1.0 version, angular 8.2. 14 and node-sass 4.13.0 Still facing the issue.

what npm --depth 9999 update is doing ?

“If no package name is specified, all packages in the specified location (global or local) will be updated. As of npm@2.6.1, the npm update will only inspect top-level packages. Prior versions of npm would also recursively inspect all dependencies. To get the old behavior, use npm --depth 9999 update .”

As retrieved today from https://docs.npmjs.com/cli/update.html.