Laravel - 克隆弹性豆茎环境后未找到 node_modules 文件

时间:2021-05-15 06:33:13

标签: laravel npm node-modules

我用我的弹性 beanstalk 环境克隆了一个 Laravel 项目。但是当我进入网页时,我所有的js&css文件都无法加载。

enter image description here

我已经安装了 npm 和 nodejs,重新安装了软件包,但仍然无法使其工作。问题是,如何在不使用 webpack/laravel-mix 的情况下链接 node_modules 中的包(因为原始项目我从未使用过这个)?

webpack.mix.js

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.js('resources/js/app.js', 'public/js')
    .sass('resources/sass/app.scss', 'public/css');

package.json

{
  "name": "@coreui/coreui-free-bootstrap-admin-template",
  "version": "3.4.0",
  "description": "Free Bootstrap Admin Template",
  "keywords": [
    "admin",
    "admin panel",
    "admin template",
    "bootstrap",
    "css",
    "dashboard",
    "framework",
    "front-end",
    "responsive",
    "sass",
    "ui kit",
    "webapp"
  ],
  "homepage": "https://coreui.io",
  "bugs": {
    "url": "https://github.com/coreui/coreui-free-bootstrap-admin-template/issues",
    "email": "support@coreui.io"
  },
  "license": "MIT",
  "author": {
    "name": "creativeLabs Łukasz Holeczek",
    "url": "https://coreui.io",
    "github": "https://github.com/coreui",
    "twitter": "https://twitter.com/core_ui"
  },
  "contributors": [
    {
      "name": "CoreUI Core Team",
      "url": "https://github.com/orgs/coreui/people"
    }
  ],
  "main": "src/index.html",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/coreui/coreui-free-bootstrap-admin-template.git"
  },
  "scripts": {
    "build": "npm run build-from-html",
    "build-clean": "rimraf dist",
    "build-vendors": "node build/vendors.js",
    "build-from-html": "npm-run-all build-clean --parallel css js copy --sequential build-vendors",
    "build-from-pug": "npm-run-all build-clean --parallel css js copy-assets pug-dist --sequential build-vendors",
    "copy": "npm-run-all --parallel copy-*",
    "copy-assets": "copyfiles -a -u 1 \"src/assets/**/*\" dist/",
    "copy-views": "copyfiles -a -u 1 \"src/**/*.html\" dist/",
    "css": "npm-run-all --parallel css-compile* --sequential css-prefix css-minify*",
    "css-compile": "node-sass --quiet --output-style expanded --source-map true --source-map-contents true --precision 8 src/scss/style.scss dist/css/style.css",
    "css-compile-vendors": "node build/vendors-sass.js",
    "css-lint": "stylelint --config build/.stylelintrc --syntax scss \"src/scss/**/*.scss\"",
    "css-minify": "cleancss --level 1 --source-map --source-map-inline-sources --output dist/css/style.min.css dist/css/style.css",
    "css-prefix": "postcss --config build/postcss.config.js --replace \"dist/css/*.css\" \"!dist/css/*.min.css\"",
    "js": "npm-run-all --parallel js-compile* ",
    "js-compile": "cross-env PLUGINS=true babel src/js/ --out-dir dist/js/ --source-maps",
    "js-lint": "eslint src/js/src",
    "js-minify": "foreach -g \"dist/js/**/*.js\" -x \"uglifyjs --compress typeofs=false --mangle  --source-map \"content=src/js/#{name}.js.map,includeSources,url=#{name}.min.js.map\" --output dist/js/#{name}.min.js dist/js/#{name}.js\"",
    "localhost": "browser-sync start --server \"./dist\" --serveStatic \"./\" --files \"./dist/\"",
    "localhost-reload": "browser-sync reload",
    "pug": "npm-run-all --parallel pug-*",
    "pug-dist": "node build/pug.js --src pug/ --dest dist/",
    "pug-src": "node build/pug.js --src pug/ --dest src/",
    "release-version": "node build/change-version.js",
    "serve": "npm-run-all --sequential build-clean css js copy --parallel localhost watch",
    "serve-dist": "serve dist",
    "serve-html": "npm-run-all --sequential build-clean css js copy --parallel localhost watch-assets watch-css watch-html watch-js",
    "serve-pug": "npm-run-all --sequential build-clean css js copy --parallel localhost watch-assets watch-css watch-pug watch-js",
    "sync-assets": "sync-glob --watch 'src/assets/**/*' dist/assets",
    "watch": "npm-run-all --parallel watch-*",
    "watch-assets": "nodemon --watch src/assets -x \"npm run sync-assets\"",
    "watch-css": "nodemon -e scss -x \"npm run css\"",
    "watch-html": "nodemon --watch src -e html -x \"npm run copy-views\"",
    "watch-js": "nodemon --watch src/js -x \"npm run js\"",
    "watch-pug": "nodemon --watch pug -e pug -x \"npm run pug-dist\"",
    "zip": "git archive -o coreui-free-bootstrap-admin-template-v$npm_package_version.zip -9 HEAD"
  },
  "dependencies": {
    "@coreui/chartjs": "^2.0.0",
    "@coreui/coreui": "^3.4.0",
    "@coreui/icons": "^2.0.0-beta.3",
    "@coreui/utils": "^1.3.1",
    "@popperjs/core": "^2.5.4",
    "chart.js": "^2.9.4",
    "gulp": "^4.0.2",
    "perfect-scrollbar": "1.5.0",
    "yarn": "^1.22.10"
  },
  "devDependencies": {
    "@babel/cli": "^7.12.7",
    "@babel/core": "^7.12.7",
    "@babel/plugin-proposal-object-rest-spread": "^7.12.1",
    "@babel/preset-env": "^7.12.7",
    "@coreui/svg-injector": "^1.0.0",
    "@coreui/vendors-injector": "^1.1.0",
    "autoprefixer": "^10.0.2",
    "babel-eslint": "^10.1.0",
    "babel-plugin-transform-es2015-modules-strip": "^0.1.1",
    "browser-sync": "^2.26.13",
    "chalk": "^4.1.0",
    "clean-css-cli": "^4.3.0",
    "copyfiles": "^2.4.0",
    "cross-env": "^7.0.2",
    "eslint": "^7.14.0",
    "eslint-config-xo": "^0.33.1",
    "eslint-plugin-import": "^2.22.1",
    "eslint-plugin-unicorn": "^23.0.0",
    "foreach-cli": "^1.8.1",
    "js-beautify": "^1.13.0",
    "jsdom": "^16.4.0",
    "minimist": "^1.2.5",
    "mkdirp": "^1.0.4",
    "node-sass": "^5.0.0",
    "nodemon": "^2.0.6",
    "npm-run-all": "^4.1.5",
    "postcss": "^8.1.9",
    "postcss-cli": "^8.3.0",
    "postcss-combine-duplicated-selectors": "^10.0.2",
    "postcss-merge-rules": "^4.0.3",
    "pug": "^3.0.0",
    "rimraf": "^3.0.2",
    "shelljs": "^0.8.4",
    "stylelint": "^13.8.0",
    "stylelint-config-recommended-scss": "^4.2.0",
    "stylelint-config-standard": "^20.0.0",
    "stylelint-order": "^4.1.0",
    "stylelint-scss": "^3.18.0",
    "sync-glob": "^1.4.0"
  },
  "engines": {
    "node": ">=6"
  },
  "browserslist": [
    "last 1 major version",
    ">= 1%",
    "Chrome >= 45",
    "Firefox >= 38",
    "Edge >= 12",
    "Explorer >= 10",
    "iOS >= 9",
    "Safari >= 9",
    "Android >= 4.4",
    "Opera >= 30"
  ]
}

0 个答案:

没有答案
相关问题