gpt4 book ai didi

windows - 无法在命令 (node build/build-plugins.js) loader.js :775 MODULE_NOT_FOUND 处执行 'npm run dist'

转载 作者:行者123 更新时间:2023-12-03 11:06:43 28 4
gpt4 key购买 nike

我目前正在关注 Bootstrap 的工具设置,但我真的很难理解这一点。

这是分步过程的来源 (https://getbootstrap.com/docs/4.3/getting-started/build-tools/)

目前,我能够运行 npm 脚本(例如 npm run dist - 根据来自 Bootstrap 的 package.json 文件)

在命令('npm run dist')期间,有一个命令被执行为:node build/build-plugins.js(我的 Bootstrap 根文件夹没有任何构建文件夹!)

这是日志(使用 Git Bash - Windows)

> bootstrap@4.3.1 js-compile-plugins C:\Workspace\risco-operacional\RiscoOperacional\packages\bootstrap.4.3.1
> node build/build-plugins.js


> bootstrap@4.3.1 css-compile-docs C:\Workspace\risco-operacional\RiscoOperacional\packages\bootstrap.4.3.1
> cross-env-shell node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 site/docs/$npm_package_version_short/assets/scss/docs.scss site/docs/$npm_package_version_short/assets/css/docs.min.css


> bootstrap@4.3.1 js-compile-plugins-coverage C:\Workspace\risco-operacional\RiscoOperacional\packages\bootstrap.4.3.1
> cross-env NODE_ENV=test node build/build-plugins.js

internal/modules/cjs/loader.js:775
throw err;
^

Error: Cannot find module 'C:\Workspace\risco-operacional\RiscoOperacional\packages\bootstrap.4.3.1\build\build-plugins.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:772:15)
at Function.Module._load (internal/modules/cjs/loader.js:677:27)
at Function.Module.runMain (internal/modules/cjs/loader.js:999:10)
at internal/main/run_main_module.js:17:11 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bootstrap@4.3.1 js-compile-plugins-coverage: `cross-env NODE_ENV=test node build/build-plugins.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bootstrap@4.3.1 js-compile-plugins-coverage 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! C:\Users\srebelo001\AppData\Roaming\npm-cache\_logs\2019-09-01T13_54_39_217Z-debug.log
fs.js:127
throw err;
^

Error: ENOENT: no such file or directory, lstat 'C:\Workspace\risco-operacional\RiscoOperacional\packages\bootstrap.4.3.1\build'
at Object.realpathSync (fs.js:1512:7)
at runRollup (C:\Users\srebelo001\AppData\Roaming\npm\node_modules\rollup\dist\bin\rollup:1312:29)
at Object.<anonymous> (C:\Users\srebelo001\AppData\Roaming\npm\node_modules\rollup\dist\bin\rollup:1363:5)
at Module._compile (internal/modules/cjs/loader.js:936:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
at Module.load (internal/modules/cjs/loader.js:790:32)
at Function.Module._load (internal/modules/cjs/loader.js:703:12)
at Function.Module.runMain (internal/modules/cjs/loader.js:999:10)
at internal/main/run_main_module.js:17:11 {
errno: -4058,
syscall: 'lstat',
code: 'ENOENT',
path: 'C:\\Workspace\\risco-operacional\\RiscoOperacional\\packages\\bootstrap.4.3.1\\build'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bootstrap@4.3.1 js-compile-bundle: `rollup --environment BUNDLE:true --config build/rollup.config.js --sourcemap`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bootstrap@4.3.1 js-compile-bundle 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! C:\Users\srebelo001\AppData\Roaming\npm-cache\_logs\2019-09-01T13_54_39_354Z-debug.log
ERROR: "js-compile-plugins-coverage" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bootstrap@4.3.1 js-compile: `npm-run-all --parallel js-compile-* --sequential js-copy`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bootstrap@4.3.1 js-compile 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! C:\Users\srebelo001\AppData\Roaming\npm-cache\_logs\2019-09-01T13_54_39_938Z-debug.log
ERROR: "js-compile" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bootstrap@4.3.1 js: `npm-run-all js-compile js-minify js-copy`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bootstrap@4.3.1 js 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! C:\Users\srebelo001\AppData\Roaming\npm-cache\_logs\2019-09-01T13_54_39_973Z-debug.log
ERROR: "js" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bootstrap@4.3.1 dist: `npm-run-all --parallel css js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bootstrap@4.3.1 dist 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! C:\Users\srebelo001\AppData\Roaming\npm-cache\_logs\2019-09-01T13_54_40_318Z-debug.log

最佳答案

您可能运行了 npm install bootstrap 命令来下载 Bootstrap 的源代码,因此您缺少 build 文件夹。

尝试使用 Composer 下载源代码。这些步骤对我有用:

  1. Composer 需要 twbs/bootstrap:4.5.0
  2. cd .\vendor\twbs\bootstrap\
  3. npm 安装
  4. npm run dist

(Evn.:Windows 10 + PowerShell,安装了 npm、node.js、Ruby+Devkit 与 Bundler 和 Jekyll)

推荐说明:https://getbootstrap.com/docs/4.5/getting-started/build-tools/

关于windows - 无法在命令 (node build/build-plugins.js) loader.js :775 MODULE_NOT_FOUND 处执行 'npm run dist',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57746613/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com