pico icon indicating copy to clipboard operation
pico copied to clipboard

node version restriction

Open olehmisar opened this issue 1 year ago • 7 comments
trafficstars

image

olehmisar avatar Mar 06 '24 22:03 olehmisar

Why does a css library that runs in browser and and doesn't even export any js restrict node version?

olehmisar avatar Mar 07 '24 08:03 olehmisar

Not sure where the 20.11.1 version comes from, as version 18 is specified in the package.json https://github.com/picocss/pico/blob/6dc6489e69cc1f22daa938ebd38c02400032428c/package.json#L65

Anyway, it prevents me from deploying on vercel.

olehmisar avatar Mar 07 '24 08:03 olehmisar

One of the devDependencies, postcss-cli, requires node >=18. What is the best practice? Should we remove any node version requirement?

lucaslarroche avatar Mar 07 '24 12:03 lucaslarroche

IDK about the best practice, but there is no need for "engines" field in package.json because your package does not run on node.js (it does not even run js at all).

However I am not sure if removing "engines" from package.json will fix the vercel deployment issue. Could you please publish a @next version or something like that, so I can test it before you publish a new patch version?

olehmisar avatar Mar 07 '24 12:03 olehmisar

@olehmisar can you try with:

"@picocss/pico": "github:picocss/pico#remove-node-engines"

Thanks for testing

lucaslarroche avatar Mar 09 '24 04:03 lucaslarroche

works nicely. No error on node 18

olehmisar avatar Mar 10 '24 23:03 olehmisar

Same issue happens on latest release on Cloudflare Pages (as a warning rather than an error, but still annoying), so this change would be appreciated since the reason for including Pico is just for the stylesheets.

sky-dragn avatar Mar 13 '24 21:03 sky-dragn