# Steps to be able to build Accelerator clients (MVC, Email) with yarn/node/npm/BuildClientScripts

**URL:** <https://forum.litium.com/t/steps-to-be-able-to-build-accelerator-clients-mvc-email-with-yarn-node-npm-buildclientscripts/2058>\
**Category:** Questions\
**Tags:** accelerator, litium-7\
**Created:** [May 18, 2021, 9:17pm UTC](https://forum.litium.com/t/steps-to-be-able-to-build-accelerator-clients-mvc-email-with-yarn-node-npm-buildclientscripts/2058 "2021-05-18T21:17:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdxperbol](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/kdxperbol/32/513_2.png) [@kdxperbol](https://forum.litium.com/u/kdxperbol)\
**Post date:** [May 18, 2021, 9:17pm UTC](https://forum.litium.com/t/steps-to-be-able-to-build-accelerator-clients-mvc-email-with-yarn-node-npm-buildclientscripts/2058/1 "2021-05-18T21:17:28Z")

</div>

I get node-sass errors when building the Accelerator clients (the Email client or the MVC client) no matter how I try to do it.

The error is in the yarn pipeline somewhere:

> error C:\Users\…\Src\Litium.Accelerator.Email\node\_modules\node-sass: Command failed.  
> Exit code: 1  
> Command: node scripts/build.js

The actual error is this:

> gyp ERR! stack Error: Command failed: C:\Python39\python.EXE -c import sys; print “%s.%s.%s” % sys.version\_info[:3];  
> gyp ERR! stack File “”, line 1  
> gyp ERR! stack import sys; print “%s.%s.%s” % sys.version\_info[:3];  
> gyp ERR! stack ^  
> gyp ERR! stack SyntaxError: invalid syntax

I’ve tried both running `BuildClientProjects` and running `yarn` directly in the MVC/Email project directories.

From some web searching, this seems like a version mismatch between node, yarn, npm, python and/or node-sass.

**What are the actual steps to get a working `BuildClientProjects`?**

1. Install Visual Studio. Does it matter which workloads?
2. Install node? Or should we use the node/npm stuff included in Visual Studio?
3. Install yarn? Via npm? Or via the installer?
4. Something else?

The [Accelerator installation instructions](https://docs.litium.com/documentation/litium-accelerators/install-litium-accelerator) are a bit vague and link to an old version of yarn.

Litium version: 7.latest

---

<div class="post-metadata">

**Author:** ![kdxperbol](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/kdxperbol/32/513_2.png) [@kdxperbol](https://forum.litium.com/u/kdxperbol)\
**Post date:** [May 19, 2021, 6:48am UTC](https://forum.litium.com/t/steps-to-be-able-to-build-accelerator-clients-mvc-email-with-yarn-node-npm-buildclientscripts/2058/2 "2021-05-19T06:48:40Z")

</div>

Python 3.latest was installed with Node. After downgrading to Python 2.latest, I get this error instead:

> ERROR in ./Styles/site.scss  
> Module build failed (from …/node\_modules/mini-css-extract-plugin/dist/loader.js):  
> ModuleBuildError: Module build failed (from …/node\_modules/sass-loader/lib/loader.js):  
> Error: Node Sass does not yet support your current environment: Windows 32-bit with Unsupported runtime (83)

---

<div class="post-metadata">

**Author:** ![kdxperbol](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/kdxperbol/32/513_2.png) [@kdxperbol](https://forum.litium.com/u/kdxperbol)\
**Post date:** [May 19, 2021, 6:53am UTC](https://forum.litium.com/t/steps-to-be-able-to-build-accelerator-clients-mvc-email-with-yarn-node-npm-buildclientscripts/2058/3 "2021-05-19T06:53:39Z")

</div>

The [documentation page for a specific add-on](https://docs.litium.com/documentation/add-ons/integration/unifaun-delivery-checkout/install) says to `npm rebuild node-sass` if there are problems with yarn, but running that gives this error:

> gyp ERR! UNCAUGHT EXCEPTION  
> gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\15.0\Bin\MSBuild.exe ENOENT  
> gyp ERR! stack at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:269:19)  
> gyp ERR! stack at onErrorNT (internal/child\_process.js:467:16)  
> gyp ERR! stack at processTicksAndRejections (internal/process/task\_queues.js:82:21)  
> gyp ERR! System Windows\_NT 10.0.17763  
> gyp ERR! command “C:\Program Files (x86)\nodejs\node.exe” “C:\Users\…\Src\Litium.Accelerator.Mvc\node\_modules\node-gyp\bin\node-gyp.js” “rebuild” “–verbose” “–libsass\_ext=” “–libsass\_cflags=” “–libsass\_ldflags=” “–libsass\_library=”  
> gyp ERR! cwd C:\Users.…\Src\Litium.Accelerator.Mvc\node\_modules\node-sass  
> gyp ERR! node -v v14.17.0  
> gyp ERR! node-gyp -v v3.8.0  
> gyp ERR! This is a bug in `node-gyp`.

It looks like the path to `MSBuild.exe` is incorrect.

---

<div class="post-metadata">

**Author:** ![steve.redstorm](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/steve.redstorm/32/14_2.png) [@steve.redstorm](https://forum.litium.com/u/steve.redstorm)\
**Post date:** [May 19, 2021, 7:48am UTC](https://forum.litium.com/t/steps-to-be-able-to-build-accelerator-clients-mvc-email-with-yarn-node-npm-buildclientscripts/2058/4 "2021-05-19T07:48:35Z")

</div>

Remove node\_modules folder and use yarn to install and rebuild the node-sass if necessary and try to build again.

---

<div class="post-metadata">

**Author:** ![NilsN](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/nilsn/32/302_2.png) [@NilsN](https://forum.litium.com/u/NilsN)\
**Post date:** [May 19, 2021, 7:53am UTC](https://forum.litium.com/t/steps-to-be-able-to-build-accelerator-clients-mvc-email-with-yarn-node-npm-buildclientscripts/2058/5 "2021-05-19T07:53:52Z")

</div>

Also make sure that node-sass supports the version of node you have installed. I believe the Accelerator uses node-sass 4.x which supports up to node 13.

---

<div class="post-metadata">

**Author:** ![hans](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/hans/32/31_2.png) [@hans](https://forum.litium.com/u/hans)\
**Post date:** [June 3, 2021, 4:31pm UTC](https://forum.litium.com/t/steps-to-be-able-to-build-accelerator-clients-mvc-email-with-yarn-node-npm-buildclientscripts/2058/6 "2021-06-03T16:31:25Z")

</div>

> [@NilsN](#):
>
> the Accelerator uses node-sass 4.x which supports up to node 13

Are there any plans to upgrade or support more recent versions of Node.js?

---

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [June 15, 2021, 6:26am UTC](https://forum.litium.com/t/steps-to-be-able-to-build-accelerator-clients-mvc-email-with-yarn-node-npm-buildclientscripts/2058/7 "2021-06-15T06:26:16Z")

</div>

[Bug is created](https://docs.litium.com/support/bugs/bug_details?id=55887) to upgrade. In later version (Litium 8) we have updated to use the sass compiler instead and most probably the same change are compatible with the Litium 7 version of accelerator also.

![image](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/cd80f5e3d5117849f4a411699858bcef31d3d048.png)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [July 13, 2021, 6:26am UTC](https://forum.litium.com/t/steps-to-be-able-to-build-accelerator-clients-mvc-email-with-yarn-node-npm-buildclientscripts/2058/8 "2021-07-13T06:26:18Z")

</div>

Closed on July 13, 2021, 6:26am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
