jspm / generator

JSPM Import Map Generator
Apache License 2.0
165 stars 21 forks source link

Skypack Malformed URLs #185

Closed AngelMunoz closed 1 year ago

AngelMunoz commented 1 year ago

Hello there, I found out a very likely bug when using skypack as the provider in the Jspm generator API

making a request like the following

curl -X POST \
    'https://api.jspm.io/generate' \
    -d '"{\r\n  \"install\": [\r\n    \"react\"\r\n  ],\r\n  \"provider\": \"skypack\"\r\n}"'

gives back this response

{
  "error": "Error: Module not found: https://cdn.skypack.dev/-/react@v17.0.1-yH0aYV1FOvoIPeKBbHxg/dist=es2019,mode=raw/index.js/index.js imported from https://cdn.skypack.dev/react@18.2.0/index.js/index.js"
}

This response happens as well for many other packages like lodash, bootstrap and others.

Aslemammad commented 1 year ago

I'm working on this, Hope I can deliver it soon.

guybedford commented 1 year ago

We landed some Skypack fixes in #191. I believe that should have resolved this issue now, but please do update on this if that is not the case.