Could not find declaration file for modules 'laravel-mix' in Laravel

h5qlskok  于 2023-05-19  发布在  其他
关注(0)|答案(1)|浏览(224)

我想使用Laravel混合和安装的节点模块,但当我导入Laravel混合-

const mix = require('laravel-mix');

上面写着-
could not find declaration file for modules 'footer'
有什么建议吗?

const mix = require('laravel-mix');

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

mix.copyDirectory('resources/backend', 'public/backend');
mix.js('resources/js/app.js', 'public/backend/js');
yqhsw0fo

yqhsw0fo1#

尝试删除node_modules文件夹并使用依赖项管理器重新安装依赖项

npm install

如果仍然不工作,发送package.json内容

相关问题