crewdevio / Snel

A Cybernetical tool for svelte applications on deno
https://crewdevio.mod.land/projects/Snel
MIT License
316 stars 13 forks source link

failed to execute snel create [projectname] - error: Uncaught TypeError: Yl.plugin is not a function #49

Closed jeanz6 closed 2 years ago

jeanz6 commented 2 years ago

If I run:

snel create myproject

snel fails to create a project with this error message:

error: Uncaught TypeError: Yl.plugin is not a function
    at https://cdn.esm.sh/v65/autoprefixer@9.8.8/deno/autoprefixer.js:57:351
    at https://cdn.esm.sh/v65/autoprefixer@9.8.8/deno/autoprefixer.js:2:9145
    at https://cdn.esm.sh/v65/autoprefixer@9.8.8/deno/autoprefixer.js:57:1697

OS: Arch Linux x86_64 Kernel: 5.14.10 deno version: deno 1.17.1 (release, x86_64-unknown-linux-gnu), v8 9.7.106.15 typescript 4.5.2

Qusay99 commented 2 years ago

I also get the same error on Windows 10 when I try to create a new snel project using

snel create [project name]

or even when I try to run an old one with

trex run start

within the project folder.

ntrotner commented 2 years ago

The imports/bundler.ts imports a library that hasn't been updated for months, which in turn imports postcss that depends on an outdated autoprefixer. Solution would be to update the Bundler. Obviously it would need to be checked if the newer versions are compatible, but by these two fixes I was able to install and use Snel:

Bundler Fix Snel Fix deno run --allow-run --allow-read https://raw.githubusercontent.com/ntrotner/Snel/main/install.ts

jeanz6 commented 2 years ago

thanks @ntrotner it works!!

buttercubz commented 2 years ago

this bug was fixed in the latest version