nx: Nx Cloud Error (it seems) during the GH Actions Workflow

Current Behavior

When running our CD workflow on the GH Actions with enabled Nx Cloud Caching (Nx Replay) we see the following in the logs:

... more logs ...

[NX CLOUD] Verifying current cloud bundle
[NX CLOUD] A local bundle currently exists:  {
  version: '2402.08.4',
  fullPath: '/home/runner/work/<redacted>/<redacted>/.nx/cache/cloud/2402.08.4'
}
[NX CLOUD] Last verification was within the past 30 minutes, will not verify this time
[NX CLOUD] Done:  /home/runner/work/<redacted>/<redacted>/.nx/cache/cloud/2402.08.4
  ERROR  failed to read input source map: failed to parse inline source map url
",u=a.length,l=(0,pr.basename)(e),f=(0,pr.extname)(e),p=n(e),g=l.slice(0,-f.length)+p+".map",E=u+g.length;if(t.substr(-E,u)===a)return t.slice(0,-E)+o;let y=u+encodeURI(g).length;return t.substr(-y,u)===a?t.slice(0,-y)+o:`${t}
Caused by:
    relative URL without a base
    at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.273.0/src/lib.rs:[38](https://github.com/<redacted>/<redacted>/actions/runs/7984859333/job/21802360408#step:10:39)5
 >  NX   Trying to create heartbeat background process for run group: 798[48](https://github.com/<redacted>/<redacted>/actions/runs/7984859333/job/21802360408#step:10:49)59333-1
 >  NX   Heartbeat process started successfully with PID 2070
 >  NX   Running target cdk-deploy-needs for 3 projects and 5 tasks they depend on:

... more logs ...

We are not sure what that is.

The workflow is able to continue and complete what it is supposed to do, despite the error in the logs.

Expected Behavior

I’m not sure, but I guess there are no errors in the logs.

GitHub Repo

private

Steps to Reproduce

  1. Create the integrated nx repo
  2. Connect to nx cloud
  3. Setup the GitHub actions workflow
  4. Run the workflow
  5. See the logs with debug mode in gh actions

Nx Report

This is from local machine:

   Node   : 20.11.0
   OS     : darwin-x64
   pnpm   : 8.15.1
   
   nx                 : 17.2.8
   @nx/js             : 17.2.8
   @nx/jest           : 17.2.8
   @nx/eslint         : 17.2.8
   @nx/workspace      : 17.2.8
   @nx/devkit         : 17.2.8
   @nx/esbuild        : 17.2.8
   @nx/eslint-plugin  : 17.2.8
   @nx/next           : 17.2.8
   @nx/node           : 17.2.8
   @nx/playwright     : 17.2.8
   @nx/plugin         : 17.2.8
   @nx/react          : 17.2.8
   typescript         : 5.3.3
   ---------------------------------------
   Community plugins:
   @nx-tools/nx-container : 5.2.0
   ---------------------------------------
   Local workspace plugins:
         @app/docker
         @app/next
         @app/aws
         @app/cdk

Failure Logs

...

[NX CLOUD] Verifying current cloud bundle
[NX CLOUD] A local bundle currently exists:  {
  version: '2402.08.4',
  fullPath: '/home/runner/work/<redacted>/<redacted>/.nx/cache/cloud/2402.08.4'
}
[NX CLOUD] Last verification was within the past 30 minutes, will not verify this time
[NX CLOUD] Done:  /home/runner/work/<redacted>/<redacted>/.nx/cache/cloud/2402.08.4
  ERROR  failed to read input source map: failed to parse inline source map url
",u=a.length,l=(0,pr.basename)(e),f=(0,pr.extname)(e),p=n(e),g=l.slice(0,-f.length)+p+".map",E=u+g.length;if(t.substr(-E,u)===a)return t.slice(0,-E)+o;let y=u+encodeURI(g).length;return t.substr(-y,u)===a?t.slice(0,-y)+o:`${t}
Caused by:
    relative URL without a base
    at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.273.0/src/lib.rs:385
 >  NX   Trying to create heartbeat background process for run group: 7984859333-1
 >  NX   Heartbeat process started successfully with PID 6299
 >  NX   Running target cdk-deploy for 3 projects and 5 tasks they depend on:

...

Package Manager Version

pnpm@8.15.1

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

Sorry for no reproduction repo. I might find a minute to create one later.

About this issue

  • Original URL
  • State: open
  • Created 4 months ago
  • Reactions: 8
  • Comments: 15 (2 by maintainers)

Most upvoted comments

I manage to fix this error

ERROR failed to read input source map: failed to parse inline source map url

By simply installing nx-cloud as a dependency.

npm install nx-cloud

I’ve tested it on Windows 11 and WSL via devcontainers and the problem seems to be fixed.

Here is a link to a basic working repository using a local plugin & executor: https://github.com/JacobGardos/nx-swc-fix (See README.md for instructions)

Let me know if this helps.


For a more detailed explanation in regards to the cause of the error check out this comment from a similar issue.

https://github.com/nrwl/nx/issues/22146#issuecomment-2028904256


Nx Report For Windows 11 & WSL

Node   : 20.11.1
OS     : win32-x64
npm    : 10.2.4

nx (global)        : 18.2.1
nx                 : 18.2.1
@nx/js             : 18.2.1
@nx/jest           : 18.2.1
@nx/linter         : 18.2.1
@nx/eslint         : 18.2.1
@nx/workspace      : 18.2.1
@nx/devkit         : 18.2.1
@nx/eslint-plugin  : 18.2.1
@nx/nest           : 18.2.1
@nx/node           : 18.2.1
@nx/plugin         : 18.2.1
@nrwl/tao          : 18.2.1
@nx/web            : 18.2.1
@nx/webpack        : 18.2.1
nx-cloud           : 18.0.0
typescript         : 5.4.3
---------------------------------------
Local workspace plugins:
         @org/my-plugin

Node   : 20.11.1
OS     : linux-x64
npm    : 10.2.4

nx (global)        : 18.2.1
nx                 : 18.2.1
@nx/js             : 18.2.1
@nx/jest           : 18.2.1
@nx/linter         : 18.2.1
@nx/eslint         : 18.2.1
@nx/workspace      : 18.2.1
@nx/devkit         : 18.2.1
@nx/eslint-plugin  : 18.2.1
@nx/nest           : 18.2.1
@nx/node           : 18.2.1
@nx/plugin         : 18.2.1
@nrwl/tao          : 18.2.1
@nx/vite           : 18.2.1
@nx/vue            : 18.2.1
@nx/web            : 18.2.1
@nx/webpack        : 18.2.1
typescript         : 5.4.3
---------------------------------------
Local workspace plugins:
         @org/nuxt

I manage to fix this error

ERROR failed to read input source map: failed to parse inline source map url

By simply installing nx-cloud as a dependency.

npm install nx-cloud

THANK YOU!

I’m hitting something similar, even locally, but only with the build command

nx run-many -t build --skip-nx-cache
  ERROR  failed to read input source map: failed to parse inline source map url
",u=a.length,l=(0,pr.basename)(e),f=(0,pr.extname)(e),p=n(e),g=l.slice(0,-f.length)+p+".map",E=u+g.length;if(t.substr(-E,u)===a)return t.slice(0,-E)+o;let y=u+encodeURI(g).length;return t.substr(-y,u)===a?t.slice(0,-y)+o:`${t}


Caused by:
    relative URL without a base
    at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.272.4/src/lib.rs:385