title: React scripts build is failing with Path contains invalid character error
body: <p>I'm getting this error When I update react-scripts to 5.0.0
  Previous version on 4.0.1 didn't have any issues
  I think this is related to the path in line 8
  I don't know what path is this. need help please</p>
  <pre><code>0 info it worked if it ends with ok
  1 verbose cli [
  1 verbose cli   'D:\\CxCache\\Nodejs.Redist.x64.12.16.3\\tools\\node.exe',
  1 verbose cli   'D:\\CxCache\\Nodejs.Redist.x64.12.16.3\\tools\\node_modules\\npm\\bin\\npm-cli.js',
  1 verbose cli   'run',
  1 verbose cli   'build',
  1 verbose cli   '--scripts-prepend-node-path'
  1 verbose cli ]
  2 info using npm@6.14.5
  3 info using node@v12.16.3
  4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
  5 info lifecycle cis.dcvisualization.nodemodules@1.0.7~prebuild: cis.dcvisualization.nodemodules@1.0.7
  6 info lifecycle cis.dcvisualization.nodemodules@1.0.7~build: cis.dcvisualization.nodemodules@1.0.7
  7 verbose lifecycle cis.dcvisualization.nodemodules@1.0.7~build: unsafe-perm in lifecycle true
  8 verbose lifecycle cis.dcvisualization.nodemodules@1.0.7~build: PATH: D:\CxCache\Nodejs.Redist.x64.12.16.3\tools\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\move\src\Services\rwf\Portal\DcVisualization\Frontend\ClientApp\node_modules\.bin;D:\CxCache\Nodejs.Redist.x64.12.16.3\tools;D:\CxCache\Taef.Redist.10.69.220510004\build\Binaries\Release\x64;D:\move\tools\path1st;D:\move\.corext\gen\InPath;C:\Users\pboddu\AppData\Local\devconsole\pkgs\DevConsole.Commandline\5.1.59;D:\CxCache\DotNetFxGAC.Corext.4.5.4\v4.0.30319;D:\CxCache\Corext.Build.1.2.7-alpha\InPath;D:\CxCache\Corext.Tools.3.0.1\AMD64;C:\Program Files\Git\cmd\;D:\CxCache\WindowsAzure.Binplace.1.0.2\Content\x86;D:\CxCache\NPM.OnCloudbuild.3.3.0\tools\yarn;D:\CxCache\.A\MsBuild.Corext.owV3jsh4-7ugsw3q995qYQ\Path;D:\CxCache\Git.Nuke.1.0.6\;D:\CxCache\Git.Track.1.0.0\;D:\CxCache\Corext.Tools.3.0.1\x86;D:\CxCache\Corext.Tools.3.0.1\scripts;D:\CxCache\Perl.Corext.5.10.0.2\x86\bin;D:\CxCache\.A\DotNetSDK.KliBuS0xUFHVWOY7ad5vhQ\;D:\CxCache\.A\VisualCppTools.8dMaKPoCspiPNE_6Ek6Mhg\lib\native\bin;C:\Python310\Scripts\;C:\Python310\;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\dotnet\;C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.9\bin;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;C:\Users\pboddu\OneDrive - Microsoft\Documents\Programs;C:\Users\pboddu\AppData\Local\CloudBuild;C:\Users\pboddu\AppData\Local\Microsoft\WindowsApps;C:\Users\pboddu\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\pboddu\AppData\Local\GitHubDesktop\bin;C:\Users\pboddu\AppData\Roaming\npm;D:\CxCache\Kits.10.0.18362.1\tools\bin\10.0.18362.0\x64;D:\CxCache\Kits.10.0.18362.1\tools\bin\10.0.18362.0\x86;D:\CxCache\Corext.Build.1.2.7-alpha\Tools;D:\CxCache\Python.Corext.2.6.150;D:\CxCache\Python.Corext.2.6.150\Lib\site-packages\pywin32_system32;D:\CxCache\IronPython.Corext.2.7.3;D:\CxCache\Zulu.OpenJDK8.Signed.8.54.0.22\zulu8.54.0.22-sa-jdk8.0.292-win_x64\bin;D:\CxCache\Apache.Ant.Corext.1.9.4.1\bin;D:\CxCache\Apache.Maven.Corext.3.3.3.1\bin;D:\CxCache\Gradle.Corext.5.5.1\bin;D:\CxCache\.A\OACR.Corext.SShIIM0kMeC3u9BLsUBZpA\AMD64;PLACEHOLDER_COMPILERS;
  9 verbose lifecycle cis.dcvisualization.nodemodules@1.0.7~build: CWD: D:\move\src\Services\rwf\Portal\DcVisualization\Frontend\ClientApp
  10 silly lifecycle cis.dcvisualization.nodemodules@1.0.7~build: Args: [ '/d /s /c', 'react-scripts build' ]
  11 silly lifecycle cis.dcvisualization.nodemodules@1.0.7~build: Returned: code: 1  signal: null
  12 info lifecycle cis.dcvisualization.nodemodules@1.0.7~build: Failed to exec build script
  13 verbose stack Error: cis.dcvisualization.nodemodules@1.0.7 build: `react-scripts build`
  13 verbose stack Exit status 1
  13 verbose stack     at EventEmitter.&lt;anonymous&gt; (D:\CxCache\Nodejs.Redist.x64.12.16.3\tools\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
  13 verbose stack     at EventEmitter.emit (events.js:310:20)
  13 verbose stack     at ChildProcess.&lt;anonymous&gt; (D:\CxCache\Nodejs.Redist.x64.12.16.3\tools\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
  13 verbose stack     at ChildProcess.emit (events.js:310:20)
  13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
  13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
  14 verbose pkgid cis.dcvisualization.nodemodules@1.0.7
  15 verbose cwd D:\move\src\Services\rwf\Portal\DcVisualization\Frontend\ClientApp
  16 verbose Windows_NT 10.0.19044
  17 verbose argv &quot;D:\\CxCache\\Nodejs.Redist.x64.12.16.3\\tools\\node.exe&quot; &quot;D:\\CxCache\\Nodejs.Redist.x64.12.16.3\\tools\\node_modules\\npm\\bin\\npm-cli.js&quot; &quot;run&quot; &quot;build&quot; &quot;--scripts-prepend-node-path&quot;
  18 verbose node v12.16.3
  19 verbose npm  v6.14.5
  20 error code ELIFECYCLE
  21 error errno 1
  22 error cis.dcvisualization.nodemodules@1.0.7 build: `react-scripts build`
  22 error Exit status 1
  23 error Failed at the cis.dcvisualization.nodemodules@1.0.7 build script.
  23 error This is probably not a problem with npm. There is likely additional logging output above.
  24 verbose exit [ 1, true ]
  </code></pre>