如何在 Laravel 8.29.0 中安装 Vue JS + TailwindCss

时间:2021-02-26 09:27:03

标签: node.js laravel vue.js webpack node-modules

开始为我的 Laravel 项目安装插件。

    1. Laravel 新公开
    1. npm 安装
    1. 作曲家需要 laravel / ui
    1. php artisan ui vue
    1. npm install -D tailwindcss @latest postcss @latest autoprefixer @latest
    1. npx tailwindcss 初始化
    1. 在 tailwind.config.js purge 中添加一行:[ './resources//*.blade.php', './resources//.js', './resources/**/.vue', ],
    1. 在 webpack.mix.js require ("tailwindcss") 中添加一行,
    1. 添加 im resource / css / app.css 3-line @tailwind base; @tailwind 组件; @tailwind 实用程序;
    1. 在主模板文件(main.blade.php)中添加链接样式表{{asset ('css / app.css')}}

在上面提到的所有monipulations之后,我执行命令npm install && npm run dev,我得到一个错误

Voice1

1 个答案:

答案 0 :(得分:0)

你会尝试这两种解决方案吗

1 - 运行 MacOS 或 Windows 超级用户 1.1 MacOS sudo npm run development 1.2 视窗right click terminal open with Administrator

2- 清洁代码 <a href="..."></a> to <a href="#"></a>