首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Bootstrap 'npm run‘错误

Bootstrap 'npm run‘错误
EN

Stack Overflow用户
提问于 2018-06-01 02:08:14
回答 1查看 1.7K关注 0票数 0

我通过npm安装Boostrap,然后在文件夹上运行npm install命令。我收到了一堆警告,但在大多数情况下,它看起来像是安装了。以下是npm install的输出

npm WARN deprecated qunitjs@2.4.1: 2.4.1 is the last version where QUnit will be published as 'qunitjs'. To receive future updates, you will need to change the package name to 'qunit'.
npm WARN deprecated nodemailer@2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated mailcomposer@4.0.1: This project is unmaintained
npm WARN deprecated socks@1.1.9: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN deprecated uws@9.14.0: stop using this version
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated buildmail@4.0.1: This project is unmaintained
npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0

> fsevents@1.2.4 install /Users/me/Desktop/bootstrap/node_modules/bootstrap/node_modules/fsevents
> node install

[fsevents] Success: "/Users/me/Desktop/bootstrap/node_modules/bootstrap/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile

> uws@9.14.0 install /Users/me/Desktop/bootstrap/node_modules/bootstrap/node_modules/uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0


> iltorb@1.3.10 install /Users/me/Desktop/bootstrap/node_modules/bootstrap/node_modules/iltorb
> detect-libc prebuild-install || node-gyp rebuild


> node-sass@4.9.0 install /Users/me/Desktop/bootstrap/node_modules/bootstrap/node_modules/node-sass
> node scripts/install.js

Cached binary found at /Users/me/.npm/node-sass/4.9.0/darwin-x64-57_binding.node

> node-sass@4.9.0 postinstall /Users/me/Desktop/bootstrap/node_modules/bootstrap/node_modules/node-sass
> node scripts/build.js

Binary found at /Users/me/Desktop/bootstrap/node_modules/bootstrap/node_modules/node-sass/vendor/darwin-x64-57/binding.node
Testing binary
Binary is fine

> nodemon@1.17.5 postinstall /Users/me/Desktop/bootstrap/node_modules/bootstrap/node_modules/nodemon
> node bin/postinstall || exit 0


> sinon@4.5.0 postinstall /Users/me/Desktop/bootstrap/node_modules/bootstrap/node_modules/sinon
> node scripts/support-sinon.js

Have some ❤️ for Sinon? You can support the project via Open Collective:
 > https://opencollective.com/sinon/donate

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN bootstrap@4.1.1 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-html@0.23.7 requires a peer of postcss-syntax@^0.10.0 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-markdown@0.23.7 requires a peer of postcss-syntax@^0.10.0 but none is installed. You must install peer dependencies yourself.

added 1449 packages from 1470 contributors and audited 11042 packages in 45.983s
found 11 vulnerabilities (1 low, 10 moderate)
  run `npm audit fix` to fix them, or `npm audit` for details

当我尝试运行一个命令时,即使是一个简单的命令,比如npm run release-version,我也会得到一堆其他的错误。下面是一个示例日志:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'run',
1 verbose cli   'release-version' ]
2 info using npm@6.1.0
3 info using node@v8.11.2
4 verbose run-script [ 'prerelease-version',
4 verbose run-script   'release-version',
4 verbose run-script   'postrelease-version' ]
5 info lifecycle bootstrap@4.1.1~prerelease-version: bootstrap@4.1.1
6 info lifecycle bootstrap@4.1.1~release-version: bootstrap@4.1.1
7 verbose lifecycle bootstrap@4.1.1~release-version: unsafe-perm in lifecycle true
8 verbose lifecycle bootstrap@4.1.1~release-version: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/me/Desktop/bootstrap/node_modules/bootstrap/node_modules/.bin:/Users/me/Desktop/bootstrap/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin
9 verbose lifecycle bootstrap@4.1.1~release-version: CWD: /Users/me/Desktop/bootstrap/node_modules/bootstrap
10 silly lifecycle bootstrap@4.1.1~release-version: Args: [ '-c', 'node build/change-version.js' ]
11 silly lifecycle bootstrap@4.1.1~release-version: Returned: code: 1  signal: null
12 info lifecycle bootstrap@4.1.1~release-version: Failed to exec release-version script
13 verbose stack Error: bootstrap@4.1.1 release-version: `node build/change-version.js`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:304:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:925:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid bootstrap@4.1.1
15 verbose cwd /Users/me/Desktop/bootstrap/node_modules/bootstrap
16 verbose Darwin 17.5.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "release-version"
18 verbose node v8.11.2
19 verbose npm  v6.1.0
20 error code ELIFECYCLE
21 error errno 1
22 error bootstrap@4.1.1 release-version: `node build/change-version.js`
22 error Exit status 1
23 error Failed at the bootstrap@4.1.1 release-version script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

我希望能够使用Bootstrap的构建工具来编译Sass。到底怎么回事?

更新:这是另一个例子,根据评论。错误日志或npm run css

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'css' ]
2 info using npm@6.1.0
3 info using node@v8.11.2
4 verbose run-script [ 'precss', 'css', 'postcss' ]
5 info lifecycle bootstrap@4.1.1~precss: bootstrap@4.1.1
6 info lifecycle bootstrap@4.1.1~css: bootstrap@4.1.1
7 verbose lifecycle bootstrap@4.1.1~css: unsafe-perm in lifecycle true
8 verbose lifecycle bootstrap@4.1.1~css: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/me/Desktop/bootstrap/node_modules/bootstrap/node_modules/.bin:/Users/me/Desktop/bootstrap/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin
9 verbose lifecycle bootstrap@4.1.1~css: CWD: /Users/me/Desktop/bootstrap/node_modules/bootstrap
10 silly lifecycle bootstrap@4.1.1~css: Args: [ '-c',
10 silly lifecycle   'npm-run-all --parallel css-lint* css-compile* --sequential css-prefix* css-minify*' ]
11 silly lifecycle bootstrap@4.1.1~css: Returned: code: 1  signal: null
12 info lifecycle bootstrap@4.1.1~css: Failed to exec css script
13 verbose stack Error: bootstrap@4.1.1 css: `npm-run-all --parallel css-lint* css-compile* --sequential css-prefix* css-minify*`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:304:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:925:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid bootstrap@4.1.1
15 verbose cwd /Users/me/Desktop/bootstrap/node_modules/bootstrap
16 verbose Darwin 17.5.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "css"
18 verbose node v8.11.2
19 verbose npm  v6.1.0
20 error code ELIFECYCLE
21 error errno 1
22 error bootstrap@4.1.1 css: `npm-run-all --parallel css-lint* css-compile* --sequential css-prefix* css-minify*`
22 error Exit status 1
23 error Failed at the bootstrap@4.1.1 css script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

以下是Terminal展示的内容:

> bootstrap@4.1.1 css /Users/me/Desktop/bootstrap/node_modules/bootstrap
> npm-run-all --parallel css-lint* css-compile* --sequential css-prefix* css-minify*


> bootstrap@4.1.1 css-lint /Users/me/Desktop/bootstrap/node_modules/bootstrap
> stylelint --syntax scss "scss/**/*.scss"


> bootstrap@4.1.1 css-lint-docs /Users/me/Desktop/bootstrap/node_modules/bootstrap
> stylelint --syntax scss "assets/scss/*.scss" && stylelint "docs/**/*.css"


> bootstrap@4.1.1 css-compile /Users/me/Desktop/bootstrap/node_modules/bootstrap
> node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/bootstrap.scss dist/css/bootstrap.css && node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/bootstrap-grid.scss dist/css/bootstrap-grid.css && node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/bootstrap-reboot.scss dist/css/bootstrap-reboot.css


> bootstrap@4.1.1 css-compile-docs /Users/me/Desktop/bootstrap/node_modules/bootstrap
> node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 assets/scss/docs.scss assets/css/docs.min.css


> bootstrap@4.1.1 css-lint-vars /Users/me/Desktop/bootstrap/node_modules/bootstrap
> node build/lint-vars.js scss/ assets/scss/

module.js:549
    throw err;
    ^

Error: Cannot find module '/Users/me/Desktop/bootstrap/node_modules/bootstrap/build/lint-vars.js'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bootstrap@4.1.1 css-lint-vars: `node build/lint-vars.js scss/ assets/scss/`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the bootstrap@4.1.1 css-lint-vars 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!     /Users/me/.npm/_logs/2018-05-31T21_11_34_091Z-debug.log
ERROR: "css-lint-vars" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bootstrap@4.1.1 css: `npm-run-all --parallel css-lint* css-compile* --sequential css-prefix* css-minify*`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the bootstrap@4.1.1 css 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!     /Users/me/.npm/_logs/2018-05-31T21_11_34_264Z-debug.log

build文件夹是自动创建的吗?

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50630344

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档