Open alexandr2110pro opened 8 months ago
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
We are seeing the same thing, locally and in CI, when building or serving any Angular app it seems (even just a trivial one generated for testing). I'm using Nx 18.0.6 currently but I think the problem maybe started when we upgraded to 18.
➜ ucm5 git:(mason-test) ✗ npx nx run demo-app-angular:build:developement
ERROR failed to read input source map: failed to parse inline source map url
",u=a.length,l=(0,dr.basename)(e),f=(0,dr.extname)(e),p=n(e),y=l.slice(0,-f.length)+p+".map",E=u+y.length;if(t.substr(-E,u)===a)return t.slice(0,-E)+o;let g=u+encodeURI(y).length;return t.substr(-g,u)===a?t.slice(0,-g)+o:`${t}
Caused by:
relative URL without a base
at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.269.16/src/lib.rs:385
✔ 1/1 dependent project tasks succeeded [0 read from cache]
Hint: you can run the command with --verbose to see the full dependent project outputs
...or, for serve
:
➜ ucm5 git:(mason-test) ✗ npx nx run demo-app-angular:serve:developement
ERROR failed to read input source map: failed to parse inline source map url
",u=a.length,l=(0,dr.basename)(e),f=(0,dr.extname)(e),p=n(e),y=l.slice(0,-f.length)+p+".map",E=u+y.length;if(t.substr(-E,u)===a)return t.slice(0,-E)+o;let g=u+encodeURI(y).length;return t.substr(-g,u)===a?t.slice(0,-g)+o:`${t}
Caused by:
relative URL without a base
at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.269.16/src/lib.rs:385
NX Running target serve for project demo-app-angular and 1 task it depends on:
... the build continues and apparently works, though, so perhaps this error isn't important but just scary looking?
I think the error is coming from swc
, our swc
dependencies are as follows:
"@swc-node/core": "^1.9.0",
"@swc-node/register": "1.8.0",
"@swc/cli": "~0.1.62",
"@swc/core": "1.3.95",
"@swc/wasm": "^1.3.92",
Does anybody know what is the impact of this error? At a glance, all works well despite the error in the console.
I don't know for sure but I suspect it is just a scary warning that is a non-critical problem under the hood. This error appears for any build/serve operation for any app in our monorepo, but they are all passing their tests and I have not detected any misbehavior. So we are ignoring it for now. (But, I have gotten questions from other engineers like "uh oh, I am seeing this new error, how can I fix this?" so hopefully it will be fixed soon...)
For me, it does not work. It makes the CI fail. I had to opt out of Nx Cloud.
@masonmark same here.
@nacho-vazquez what does it say in the end if you enable both debug logging on gh actions and --verbose in nx?
I'll come back to you with that.
Same problem here locally and on CI (Jenkins) since I upgrading to Nx 18.
Using Mac OS
Same problem here, too. Happening on both Mac OS and Windows (and within a Github Workflow).
Same. Windows inside of WSL Ubuntu when running local builds.
I'm getting the exact error, not sure what is the root cuase of this
nx run gateway:build:production
ERROR failed to read input source map: failed to parse inline source map url
",c=a.length,u=(0,Fn.basename)(e),p=(0,Fn.extname)(e),f=r(e),h=u.slice(0,-p.length)+f+".map",g=c+h.length;if(t.substr(-g,c)===a)return t.slice(0,-g)+s;let b=c+encodeURI(h).length;return t.substr(-b,c)===a?t.slice(0,-b)+s:`${t}
Caused by:
relative URL without a base
at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.273.17/src/lib.rs:385
Getting this error after creating a custom executor to serve dependent apps. Still able to run other nx commands without issue.
macOS 14.2.1 M1 Max NX 18.0.4
nx serve-detached example-nest
ERROR failed to read input source map: failed to parse inline source map url
",c=a.length,u=(0,Fn.basename)(e),p=(0,Fn.extname)(e),f=r(e),h=u.slice(0,-p.length)+f+".map",g=c+h.length;if(t.substr(-g,c)===a)return t.slice(0,-g)+s;let b=c+encodeURI(h).length;return t.substr(-b,c)===a?t.slice(0,-b)+s:`${t}
Caused by:
relative URL without a base
at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.266.36/src/lib.rs:384
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!
@heathprovost thanks. This helped with the same problem with my TypeScript/NativeScript/Angular17 monorepo executor on MacOS Sonoma 14.4.1 :) Cheers!
This issue has been automatically marked as stale because it hasn't had any activity for 6 months. Many things may have changed within this time. The issue may have already been fixed or it may not be relevant anymore. If at this point, this is still an issue, please respond with updated information. It will be closed in 21 days if no further activity occurs. Thanks for being a part of the Nx community! 🙏
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:
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
Nx Report
Failure Logs
Package Manager Version
pnpm@8.15.1
Operating System
Additional Information
Sorry for no reproduction repo. I might find a minute to create one later.