yiyungent / hexo-asset-img

🍰 Hexo local image plugin. | Hexo 本地图片插件: 转换 图片相对路径 为 asset_img
MIT License
61 stars 8 forks source link

hexo@7.0.0-rc1 生成时报错 #8

Closed ytf4425 closed 1 year ago

ytf4425 commented 1 year ago

ERROR Plugin load failed: hexo-asset-img TypeError: require(...) is not a function at C:\path\to\dir\node_modules\hexo-asset-img\index.js:1:97 at C:\path\to\dir\node_modules\hexo\dist\hexo\index.js:248:20 at tryCatcher (C:\path\to\dir\node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (C:\path\to\dir\node_modules\bluebird\js\release\promise.js:547:31) at Promise._settlePromise (C:\path\to\dir\node_modules\bluebird\js\release\promise.js:604:18) at Promise._settlePromise0 (C:\path\to\dir\node_modules\bluebird\js\release\promise.js:649:10) at Promise._settlePromises (C:\path\to\dir\node_modules\bluebird\js\release\promise.js:729:18) at _drainQueueStep (C:\path\to\dir\node_modules\bluebird\js\release\async.js:93:12) at _drainQueue (C:\path\to\dir\node_modules\bluebird\js\release\async.js:86:9) at Async._drainQueues (C:\path\to\dir\node_modules\bluebird\js\release\async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (C:\path\to\dir\node_modules\bluebird\js\release\async.js:15:14) at processImmediate (node:internal/timers:466:21)

hexo-site@0.0.0 ├── @next-theme/plugins@8.15.1 ├── hexo-asset-img@1.0.0 ├── hexo-deployer-git@4.0.0 ├── hexo-generator-archive@2.0.0 ├── hexo-generator-category@2.0.0 ├── hexo-generator-index@3.0.0 ├── hexo-generator-tag@2.0.0 ├── hexo-next-valine@2.1.0 ├── hexo-renderer-ejs@2.0.0 ├── hexo-renderer-pandoc@0.3.1 ├── hexo-renderer-stylus@2.1.0 ├── hexo-server@3.0.0 ├── hexo-theme-landscape@0.0.3 ├── hexo-theme-next@8.15.1 └── hexo@7.0.0-rc1

研究了一下是因为7.0.0的hexo升级了hexo-log组件,有了新的用法,需要使用 const log = require('hexo-log').default({ 'debug': false, 'slient': false });

ytf4425 commented 1 year ago

发现已经修完了,只是npm的版本太老了😂😂