- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试运行命令 npm run dev
或 npm run production
.但没有一个是成功的。一旦我运行命令,我就会收到类似图像的错误:
error after running npm run prod
我的 package.json 文件如下所示:
{
"private": true,
"scripts": {
"dev": "npm run development",
"dev:all": "concurrently \"npm run dev --section=js && npm run build:lang\" \"npm run dev --section=css\" \"npm run dev --section=server\" --kill-others-on-fail",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"build:lang": "cross-env babel-node ./lang.script.js",
"clear:babel-cache": "rimraf -rf ./node_modules/.cache/babel-loader/*",
"clear:messages": "rimraf -rf ./resources/messages/*",
"watch": "npm run development -- --watch",
"watch:all": "concurrently \"npm run watch --section=js\" \"npm run watch --section=css\" \"npm run watch --section=server\" --kill-others-on-fail",
"watch-poll": "npm run watch -- --watch-poll",
"watch-poll:all": "concurrently \"npm run watch-poll --section=js\" \"npm run watch-poll --section=css\" \"npm run watch-poll --section=server\" --kill-others-on-fail",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"hot:all": "concurrently \"npm run hot --section=js\" --kill-others-on-fail",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod:all": "concurrently \"npm run prod --section=js && npm run build:lang\" \"npm run prod --section=css\" \"npm run prod --section=server\" --kill-others-on-fail",
"ide": "php artisan ide-helper:generate && php artisan ide-helper:meta && php artisan ide-helper:models -N"
},
"devDependencies": {
"@ant-design/icons": "^4.4.0",
"@babel/node": "^7.12.10",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/preset-react": "^7.12.10",
"@hot-loader/react-dom": "^17.0.1",
"@loadable/component": "^5.14.1",
"@ungap/url-search-params": "^0.2.2",
"antd": "^4.11.2",
"autoprefixer": "^10.2.3",
"axios": "^0.21",
"babel-plugin-import": "^1.13.3",
"babel-plugin-react-intl": "^3.2.1",
"babel-plugin-recharts": "^1.2.1",
"clean-webpack-plugin": "^3.0.0",
"cross-env": "^7.0.3",
"css-loader": "^5.0.1",
"echarts": "^5.0.1",
"echarts-for-react": "^2.0.16",
"fast-deep-equal": "^3.1.3",
"file-loader": "^6.2.0",
"flag-icon-css": "^3.5.0",
"fs": "0.0.1-security",
"glob": "^7.1.6",
"history": "^5.0.0",
"install": "^0.13.0",
"laravel-echo": "^1.10.0",
"laravel-mix": "^6.0.11",
"less": "4.1.0",
"less-vars-to-js": "^1.3.0",
"line-awesome": "github:icons8/line-awesome",
"line-height": "^0.3.1",
"lodash": "^4.17.20",
"lodash-webpack-plugin": "^0.11.6",
"mkdirp": "^1.0.4",
"moment": "^2.29.1",
"node-sass": "^5.0.0",
"nprogress": "^0.2.0",
"postcss-less": "^4.0.0",
"prop-types": "^15.7.2",
"pusher-js": "^7.0.3",
"react-dnd": "^11.1.3",
"react-google-recaptcha": "^2.1.0",
"react-hot-loader": "^4.13.0",
"react-intl": "^5.10.19",
"react-motion": "^0.5.2",
"react-redux": "^7.2.2",
"react-router-redux": "^5.0.0-alpha.9",
"react-scrollbar": "^0.5.6",
"react-slick": "^0.28.0",
"recharts": "^2.0.4",
"redux": "^4.0.5",
"redux-saga": "^1.1.3",
"redux-thunk": "^2.3.0",
"resolve-url-loader": "^3.1.2",
"rfs": "^9.0.3",
"sass": "^1.32.5",
"sass-loader": "^10.1.1",
"socket.io-client": "^3.1.0",
"style-loader": "^2.0.0",
"url-search-params": "^1.1.0",
"vue-template-compiler": "^2.6.12",
"webpack": "^5.19.0",
"webpack-bundle-analyzer": "^4.4.0"
},
"browserslist": [
"since 2015"
],
"dependencies": {
"@ant-design/dark-theme": "^2.0.2",
"@tinymce/tinymce-react": "^3.9.0",
"animate.css": "^4.1.1",
"concurrently": "^5.3.0",
"connected-react-router": "^6.8.0",
"cropperjs": "^1.5.9",
"cryptocoins-icons": "^2.9.0",
"dompurify": "^2.2.6",
"husky": "^4.3.8",
"intl-tel-input": "^17.0.8",
"laravel-echo-server": "^1.6.2",
"laravel-mix-merge-manifest": "^1.0.1",
"less-loader": "^7.3.0",
"memfs": "^3.2.0",
"qrcode.react": "^1.0.1",
"raw-loader": "^4.0.2",
"rc-color-picker": "^1.2.6",
"react": "^17.0.1",
"react-bottom-scroll-listener": "^5.0.0",
"react-cryptocoins": "^1.0.11",
"react-dom": "^17.0.1",
"react-full-screen": "^0.3.1",
"react-grid-layout": "^1.2.0",
"react-helmet": "^6.1.0",
"react-idle-timer": "^4.5.2",
"react-infinite-scroller": "^1.2.4",
"react-phone-input-2": "^2.13.9",
"react-phone-number-input": "^3.1.10",
"react-quill": "^1.3.5",
"react-router-dom": "^5.2.0",
"rimraf": "^3.0.2",
"simplebar-react": "^2.3.0",
"tinymce": "^5.6.2"
},
"husky": {
"hooks": {
"pre-commit": "npm run clear:babel-cache && npm run clear:messages && npm run prod:all && git add ."
}
}
}
我的 webpack.mix.js 文件如下所示:
const rimraf = require('rimraf');
if(['js', 'css'].includes(process.env.npm_config_section)){
rimraf.sync('./public/mix-manifest.json');
}
if(['server'].includes(process.env.npm_config_section)){
rimraf.sync('./public/server/mix-manifest.json');
}
if (['js', 'css', 'server'].includes(process.env.npm_config_section)) {
require(`${__dirname}/webpack.${process.env.npm_config_section}.mix.js`)
} else {
throw new Error('Invalid section argument!')
}
webpack 文件夹位于我安装 Laravel 的目录中的 node_modules 内。 (/home/coins/coins)。
v14.15.4
我花了 1 周的时间,但我仍然无法弄清楚。我无法运行任何与 npm run ... 相关的东西。
{
"private": true,
"scripts": {
"dev": "npm run development",
"dev:all": "concurrently \"npm run dev --section=js && npm run build:lang\" \"npm run dev --section=css\" \"npm run dev --section=server\" --kill-others-on-fail",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"build:lang": "cross-env babel-node ./lang.script.js",
"clear:babel-cache": "rimraf -rf ./node_modules/.cache/babel-loader/*",
"clear:messages": "rimraf -rf ./resources/messages/*",
"watch": "npm run development -- --watch",
"watch:all": "concurrently \"npm run watch --section=js\" \"npm run watch --section=css\" \"npm run watch --section=server\" --kill-others-on-fail",
"watch-poll": "npm run watch -- --watch-poll",
"watch-poll:all": "concurrently \"npm run watch-poll --section=js\" \"npm run watch-poll --section=css\" \"npm run watch-poll --section=server\" --kill-others-on-fail",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"hot:all": "concurrently \"npm run hot --section=js\" --kill-others-on-fail",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod:all": "concurrently \"npm run prod --section=js && npm run build:lang\" \"npm run prod --section=css\" \"npm run prod --section=server\" --kill-others-on-fail",
"ide": "php artisan ide-helper:generate && php artisan ide-helper:meta && php artisan ide-helper:models -N"
},
"devDependencies": {
"@ant-design/icons": "^2.1.0",
"@babel/node": "^7.4.5",
"@babel/plugin-proposal-class-properties": "^7.4.4",
"@babel/plugin-proposal-object-rest-spread": "^7.8.3",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/preset-react": "^7.0.0",
"@hot-loader/react-dom": "^16.8.6",
"@loadable/component": "^5.10.1",
"@ungap/url-search-params": "^0.1.2",
"antd": "^3.23.1",
"autoprefixer": "^9.6.1",
"axios": "^0.18",
"babel-plugin-import": "^1.11.2",
"babel-plugin-react-intl": "^3.2.1",
"babel-plugin-recharts": "^1.2.0",
"clean-webpack-plugin": "^3.0.0",
"cross-env": "^5.1",
"css-loader": "^3.2.0",
"echarts": "^4.2.1",
"echarts-for-react": "^2.0.15-beta.0",
"fast-deep-equal": "^2.0.1",
"file-loader": "^4.2.0",
"flag-icon-css": "^3.3.0",
"fs": "0.0.1-security",
"glob": "^7.1.4",
"history": "^4.9.0",
"install": "^0.12.2",
"laravel-echo": "^1.5.4",
"laravel-mix": "^4.0.7",
"less": "2.7.3",
"less-vars-to-js": "^1.3.0",
"line-awesome": "github:icons8/line-awesome",
"line-height": "^0.3.1",
"lodash": "^4.17.11",
"lodash-webpack-plugin": "^0.11.5",
"mkdirp": "^0.5.1",
"moment": "^2.24.0",
"node-sass": "^4.13.0",
"nprogress": "^0.2.0",
"postcss-less": "^3.1.4",
"prop-types": "^15.7.2",
"pusher-js": "^4.4.0",
"react-dnd": "^5.0.0",
"react-google-recaptcha": "^1.0.5",
"react-hot-loader": "^4.11.1",
"react-intl": "^3.0.0-beta-8",
"react-motion": "^0.5.2",
"react-redux": "^7.1.0",
"react-router-redux": "^5.0.0-alpha.9",
"react-scrollbar": "^0.5.6",
"react-slick": "^0.23.1",
"recharts": "^1.8.5",
"redux": "^4.0.0",
"redux-saga": "^0.16.0",
"redux-thunk": "^2.3.0",
"resolve-url-loader": "^2.3.1",
"rfs": "^8.0.4",
"sass": "^1.15.2",
"sass-loader": "^7.1.0",
"socket.io-client": "^2.2.0",
"style-loader": "^0.23.1",
"url-search-params": "^1.1.0",
"vue-template-compiler": "^2.6.10",
"webpack-bundle-analyzer": "^3.3.2"
},
"browserslist": [
"since 2015"
],
"dependencies": {
"@ant-design/dark-theme": "^0.2.2",
"@tinymce/tinymce-react": "^3.3.2",
"animate.css": "^3.7.2",
"concurrently": "^5.0.0",
"connected-react-router": "^6.5.2",
"cropperjs": "^1.5.5",
"cryptocoins-icons": "^2.9.0",
"dompurify": "^2.0.7",
"husky": "^3.0.8",
"intl-tel-input": "^16.0.3",
"laravel-mix-merge-manifest": "^0.1.2",
"less-loader": "^5.0.0",
"memfs": "^2.15.5",
"qrcode.react": "^0.9.3",
"raw-loader": "^3.1.0",
"rc-color-picker": "^1.2.6",
"react": "^16.8.6",
"react-bottom-scroll-listener": "^3.0.0",
"react-cryptocoins": "^1.0.11",
"react-dom": "^16.9.0",
"react-full-screen": "^0.2.4",
"react-grid-layout": "^0.17.1",
"react-helmet": "^5.2.1",
"react-idle-timer": "^4.2.9",
"react-infinite-scroller": "^1.2.4",
"react-phone-input-2": "^2.9.5",
"react-phone-number-input": "^2.3.21",
"react-quill": "^1.3.3",
"react-router-dom": "^5.0.1",
"rimraf": "^3.0.0",
"simplebar-react": "^1.2.3",
"tinymce": "^4.9.6"
},
"husky": {
"hooks": {
"pre-commit": "npm run clear:babel-cache && npm run clear:messages && npm run prod:all && git add ."
}
}
}
任何帮助将不胜感激。
最佳答案
Laravel Mix 6 从 CLI 中删除了许多选项。您将需要更新 scripts
您的 package.json
部分相应地归档。
见 更新您的 NPM 脚本
https://laravel-mix.com/docs/6.0/upgrade#update-your-npm-scripts
前:
"scripts": {
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
}
后:
"scripts": {
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"production": "mix --production"
}
或者考虑恢复到以前版本的 Mix。
webpack.mix.js
进行其他更改使事情发挥作用所必需的。
关于laravel - npm 运行生产错误 : "unknown option no-progress",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65976497/
我已经使用 vue-cli 两个星期了,直到今天一切正常。我在本地建立这个项目。 https://drive.google.com/open?id=0BwGw1zyyKjW7S3RYWXRaX24tQ
您好,我正在尝试使用 python 库 pytesseract 从图像中提取文本。请找到代码: from PIL import Image from pytesseract import image_
我的错误 /usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS reference
我已经训练了一个模型,我正在尝试使用 predict函数但它返回以下错误。 Error in contrasts<-(*tmp*, value = contr.funs[1 + isOF[nn]])
根据Microsoft DataConnectors的信息我想通过 this ODBC driver 创建一个从 PowerBi 到 PostgreSQL 的连接器使用直接查询。我重用了 Micros
我已经为 SoundManagement 创建了一个包,其中有一个扩展 MediaPlayer 的类。我希望全局控制这个变量。这是我的代码: package soundmanagement; impo
我在Heroku上部署了一个应用程序。我正在使用免费服务。 我经常收到以下错误消息。 PG::Error: ERROR: out of memory 如果刷新浏览器,就可以了。但是随后,它又随机发生
我正在运行 LAMP 服务器,这个 .htaccess 给我一个 500 错误。其作用是过滤关键字并重定向到相应的域名。 Options +FollowSymLinks RewriteEngine
我有两个驱动器 A 和 B。使用 python 脚本,我在“A”驱动器中创建一些文件,并运行 powerscript,该脚本以 1 秒的间隔将驱动器 A 中的所有文件复制到驱动器 B。 我在 powe
下面的函数一直返回这个错误信息。我认为可能是 double_precision 字段类型导致了这种情况,我尝试使用 CAST,但要么不是这样,要么我没有做对...帮助? 这是错误: ERROR: i
这个问题已经有答案了: Syntax error due to using a reserved word as a table or column name in MySQL (1 个回答) 已关闭
我的数据库有这个小问题。 我创建了一个表“articoli”,其中包含商品的品牌、型号和价格。 每篇文章都由一个 id (ID_ARTICOLO)` 定义,它是一个自动递增字段。 好吧,现在当我尝试插
我是新来的。我目前正在 DeVry 在线学习中级 C++ 编程。我们正在使用 C++ Primer Plus 这本书,到目前为止我一直做得很好。我的老师最近向我们扔了一个曲线球。我目前的任务是这样的:
这个问题在这里已经有了答案: What is an undefined reference/unresolved external symbol error and how do I fix it?
我的网站中有一段代码有问题;此错误仅发生在 Internet Explorer 7 中。 我没有在这里发布我所有的 HTML/CSS 标记,而是发布了网站的一个版本 here . 如您所见,我在列中有
如果尝试在 USB 设备上构建 node.js 应用程序时在我的树莓派上使用 npm 时遇到一些问题。 package.json 看起来像这样: { "name" : "node-todo",
在 Python 中,您有 None单例,在某些情况下表现得很奇怪: >>> a = None >>> type(a) >>> isinstance(a,None) Traceback (most
这是我的 build.gradle (Module:app) 文件: apply plugin: 'com.android.application' android { compileSdkV
我是 android 的新手,我的项目刚才编译和运行正常,但在我尝试实现抽屉导航后,它给了我这个错误 FAILURE: Build failed with an exception. What wen
谁能解释一下?我想我正在做一些非常愚蠢的事情,并且急切地等待着启蒙。 我得到这个输出: phpversion() == 7.2.25-1+0~20191128.32+debian8~1.gbp108
我是一名优秀的程序员,十分优秀!