Error: Cannot find module 'webpack-cli/package.json

laravel8.* / 3290人浏览 / 0人评论

php artisan ui vue,Error: Cannot find module 'webpack-cli/package.json',Please run "npm install && npm run dev" to compile your fresh scaffolding.

异常情景

laravel中使用laravel-ui框架,还用到Bootstrap,使用如下命令来引入Bootstrap报的异常

php artisan ui vue

Error: Cannot find module 'webpack-cli/package.json'Please run "`
npm install && npm run dev`" to compile your fresh scaffolding.

特别提醒

如果使用npm插件无法从过来服务器拉取依赖包,请更换国内cnpm从国内服务器拉取

webpack-cli全局安装

npm rm -g webpack-cli or cnpm rm -g webpack-cli
And in the project
npm i -D webpack-cli or cnpm i -D webpack-cli

msi@pozee MINGW64 /d/phpstudy/www/laravel-shop (master)
$ cnpm install && cnpm run dev
√ Installed 14 packages
√ Linked 0 latest versions
√ Run 0 scripts
√ All packages installed (used 11ms(network 10ms), speed 0B/s, json 0(0B), tll 0B)
》@ dev D:phpstudy_proWWWlaravel-shop
》npm run development

》 @ development D:phpstudy_proWWWlaravel-shop
》 mix

i Compiling Mix
DEPRECATION WARNING: Using / for division is deprecated and will be removed art Sass 2.0.0.

Recommendation: math.div($spacer, 2)

More info and automated migrator: https://sass-lang.com/d/slash-div
302 │ $headings-margin-bottom: $spacer / 2 !default;
node_modulesbootstrapscss_variables.scss 302:31 @import
node_modulesbootstrapscssbootstrap.scss 9:9 @import
resourcessassapp.scss 8:9 root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed art Sass 2.0.0.

Recommendation: math.div($input-padding-y, 2)

More info and automated migrator: https://sass-lang.com/d/slash-div

498 │ $input-height-inner-quarter: add($input-line-height * .25emnput-padding-y / 2) !default;
│ ^^^^^^^^^^^^^^^^^^
node_modulesbootstrapscss_variables.scss 498:73 @import
node_modulesbootstrapscssbootstrap.scss 9:9 @import
resourcessassapp.scss 8:9 root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed art Sass 2.0.0.

Recommendation: math.div($custom-control-indicator-size, 2)

More info and automated migrator: https://sass-lang.com/d/slash-div

568 │ $custom-switch-indicator-border-radius: $custom-control-indicasize / 2 !default;
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

node_modulesbootstrapscss_variables.scss 568:49 @import
node_modulesbootstrapscssbootstrap.scss 9:9 @import
resourcessassapp.scss 8:9 root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed art Sass 2.0.0.

Recommendation: math.div($spacer, 2)

More info and automated migrator: https://sass-lang.com/d/slash-div

713 │ $nav-divider-margin-y: $spacer / 2 !default;
│ ^^^^^^^^^^^

node_modulesbootstrapscss_variables.scss 713:37 @import
node_modulesbootstrapscssbootstrap.scss 9:9 @import
resourcessassapp.scss 8:9 root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed art Sass 2.0.0.

Recommendation: math.div($spacer, 2)

More info and automated migrator: https://sass-lang.com/d/slash-div

718 │ $navbar-padding-y: $spacer / 2 !default;
│ ^^^^^^^^^^^

node_modulesbootstrapscss_variables.scss 718:37 @import
node_modulesbootstrapscssbootstrap.scss 9:9 @import
resourcessassapp.scss 8:9 root stylesheet

WARNING: 64 repetitive deprecation warnings omitted.

Laravel Mix v6.0.19

✔ Compiled Successfully in 3300ms
┌───────────────────────────────────┬─────────┐
│ File │ Size │
├───────────────────────────────────┼─────────┤
│ /js/app.js │ 1.4 MiB │
│ css/app.css │ 178 KiB │
└───────────────────────────────────┴─────────┘
√ Mix: Compiled successfully in 3.33s
webpack compiled successfully

转载注明:

扩展查找

0 条评论

还没有人发表评论

发表评论 取消回复

记住我的信息,方便下次评论
有人回复时邮件通知我