Здравствуйте. По видеоуроку натягивал шаблон на Laravel.
Laravel 5.4
Ввел данный код, чтобы скомпилировать js и css файлы в один файл(файл webpack.mix.js):
let 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.styles([
'resources/assets/admin/bootstrap/css/bootstrap.min.css',
'resources/assets/admin/font-awesome/4.5.0/css/font-awesome.min.css',
'resources/assets/admin/ionicons/2.0.1/css/ionicons.min.css',
'resources/assets/admin/dist/css/AdminLTE.min.css',
'resources/assets/admin/dist/css/skins/_all-skins.min.css'
], 'public/css/admin.css');
mix.scripts([
'resources/assets/admin/plugins/jQuery/jquery-2.2.3.min.js',
'resources/assets/admin/bootstrap/js/bootstrap.min.js',
'resources/assets/admin/plugins/slimScroll/jquery.slimscroll.min.js',
'resources/assets/admin/plugins/fastclick/fastclick.js',
'resources/assets/admin/plugins/dist/js/app.min.js',
'resources/assets/admin/dist/js/demo.js',
], 'public/js/admin.js');
mix.copy('resources/assets/assets/bootstrap/fonts', 'public/fonts');
Далее пошел в консоль, и написал данную комманду: npm run dev
Далее вышло много ошибок, вот:
> @ dev /home/ssciiike/blog.glezer.ru
> npm run development
> @ development /home/ssciiike/blog.glezer.ru
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
sh: cross-env: команда не найдена
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ssciiike/.npm/_logs/2018-07-05T16_13_00_006Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ssciiike/.npm/_logs/2018-07-05T16_13_00_023Z-debug.log
Работаю на Linux Mint, Проект лежит на Хостинге. Долго искал решение, но не нашел, пробовал удалять папку node_models и тд, но не помогло. Также, скажите, как установить эту папку обратно? или без нее можно обойтись