汇总错误示例
说明汇总的(可能)问题。
我错过了什么吗?这是一个具有最小配置的项目,可以重现我遇到的“问题”。问题似乎只是无关的命令行日志记录,而不会影响捆绑包本身;即捆绑包被正确和准确地创建。
该项目显示输出:
$ ./node_modules/.bin/rollup -c rollup.js
node_modules/nan
resolve failed: { Error: Cannot find module 'babel-runtime'
at Function.Module._resolveFilename (module.js:472:15)
at Function.requireRelative.resolve (/Users/jkalis/Pro/QL/WebCore/luxui/rollup-testing/node_modules/require-relative/index.js:30:17)
at resolve (/Users/jkalis/Pro/QL/WebCore/luxui/rollup-testing/node_modules/modify-babel-preset/lib/serialize.js:25:26)
at findAndRemove (/Users/jkalis/Pro/QL/WebCore/luxui/rollup-testing/node_modules/modify-babel-preset/lib/serialize.js:67:11)
at /Users/jkalis/Pro/QL/WebCore/luxui/rollup-testing/node_modules/modify-babel-preset/lib/serialize.js:111:13
at Array.map (native)
at loadPreset (/Users/jkalis/Pro/QL/WebCore/luxui/rollup-testing/node_modules/modify-babel-preset/lib/serialize.js:103:29)
at module.exports (/Users/jkalis/Pro/QL/WebCore/luxui/rollup-testing/node_modules/modify-babel-preset/index.js:97:19)
at Object.<anonymous> (/Users/jkalis/Pro/QL/WebCore/luxui/rollup-testing/node_modules/babel-preset-es2015-rollup/index.js:3:18)
at Module._compile (module.js:573:32) code: 'MODULE_NOT_FOUND' } babel-runtime
重现此的命令是:
npm run bundle
, 或者./node_modules/.bin/rollup -c rollup.js
在其他项目中,我有类似的问题,额外的解决“失败”似乎不会影响捆绑包本身。这是很容易解决的问题吗?
我创建了一个 Git 存储库 - https://github.com/kalisjoshua/rollup-error-example - 它展示了这种行为。
我错过了什么?