Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.5.0 TypeError: Invalid URL at Object.e [as resolveUrl] #405

Open
JennerChen opened this issue Jan 8, 2025 · 4 comments
Open

v1.5.0 TypeError: Invalid URL at Object.e [as resolveUrl] #405

JennerChen opened this issue Jan 8, 2025 · 4 comments

Comments

@iliapolo
Copy link

iliapolo commented Jan 8, 2025

We are seeing this as well:

More information can be found at: https://a.co/74kJMmI
(Use `node --trace-warnings ...` to show where the warning was created)
TypeError [ERR_INVALID_URL]: Invalid URL
    at new NodeError (node:internal/errors:387:5)
    at URL.onParseError (node:internal/url:565:9)
    at new URL (node:internal/url:641:5)
    at Validator.resolve (/tmp/cdk-integ-0i8alj125w4m/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/jsonschema/lib/validator.js:263:16)
    at Validator.validateSchema (/tmp/cdk-integ-0i8alj125w4m/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/jsonschema/lib/validator.js:194:25)
    at Validator.validate (/tmp/cdk-integ-0i8alj125w4m/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/jsonschema/lib/validator.js:133:21)
    at Function.validate (/tmp/cdk-integ-0i8alj125w4m/node_modules/@aws-cdk/cloud-assembly-schema/lib/manifest.ts:194:30)
    at Function.saveManifest (/tmp/cdk-integ-0i8alj125w4m/node_modules/@aws-cdk/cloud-assembly-schema/lib/manifest.ts:220:14)
    at Function.saveAssemblyManifest (/tmp/cdk-integ-0i8alj125w4m/node_modules/@aws-cdk/cloud-assembly-schema/lib/manifest.ts:74:14)
    at CloudAssemblyBuilder.buildAssembly (/tmp/cdk-integ-0i8alj125w4m/node_modules/aws-cdk-lib/cx-api/lib/cloud-assembly.js:1:6547) {
  input: '/undefined#/definitions/AssemblyManifest',
  code: 'ERR_INVALID_URL'

Note that this is running on node16 - is this an intentional breakage?

@iliapolo
Copy link

iliapolo commented Jan 8, 2025

Also - how come there is no 1.5.0 tag in the repo? this would help identify the relevant commit.

mergify bot pushed a commit to cdklabs/cloud-assembly-schema that referenced this issue Jan 8, 2025
Latest [upgrade](#119) broke schema validation on node 16 because it bumped us to a faulty version of `jsonschema`. 

> See tdegrunt/jsonschema#405
@Hypnosphi
Copy link

Hypnosphi commented Jan 9, 2025

Same error in Chrome 129. Looks like this expression only works since Chrome 130

new URL('/', 'resolve://')

const resolvedUrl = new URL(to, new URL(from, 'resolve://'));

related: #396

@henryrgithub @tdegrunt can you please take a look

@huy97
Copy link

huy97 commented Jan 14, 2025

"resolutions": {
    "jsonschema": "1.4.1"
  },

I added it to package.json, and it worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants