You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Function yaml.safeLoad is removed in js-yaml 4. Use yaml.load instead, which is now safe by default.
at Object.safeLoad (/Users/username/hexo/blog/node_modules/[email protected]@js-yaml/index.js:10:11)
**at getSettings (/Users/username/hexo/blog/node_modules/[email protected]@hexo-admin/api.js:44:26)**
at /Users/username/hexo/blog/node_modules/[email protected]@hexo-admin/api.js:150:14
at /Users/username/hexo/blog/node_modules/[email protected]@hexo-admin/api.js:141:7
at call (/Users/username/hexo/blog/node_modules/[email protected]@connect/index.js:239:7)
at next (/Users/username/hexo/blog/node_modules/[email protected]@connect/index.js:183:5)
at next (/Users/username/hexo/blog/node_modules/[email protected]@connect/index.js:161:14)
at jsonParser (/Users/username/hexo/blog/node_modules/[email protected]@body-parser/lib/types/json.js:110:7)
at call (/Users/username/hexo/blog/node_modules/[email protected]@connect/index.js:239:7)
at next (/Users/username/hexo/blog/node_modules/[email protected]@connect/index.js:183:5)
at SendStream.error (/Users/username/hexo/blog/node_modules/[email protected]@serve-static/index.js:121:7)
at SendStream.emit (events.js:376:20)
at SendStream.error (/Users/username/hexo/blog/node_modules/[email protected]@send/index.js:270:17)
at SendStream.onStatError (/Users/username/hexo/blog/node_modules/[email protected]@send/index.js:421:12)
at next (/Users/username/hexo/blog/node_modules/[email protected]@send/index.js:735:16)
at onstat (/Users/username/hexo/blog/node_modules/[email protected]@send/index.js:724:14)
at FSReqCallback.oncomplete (fs.js:192:21)
// reads admin panel settings from _admin-config.yml// or writes it if it does not existfunctiongetSettings(){varpath=hexo.base_dir+'_admin-config.yml'if(!fs.existsSync(path)){hexo.log.d('admin config not found, creating one')fs.writeFile(hexo.base_dir+'_admin-config.yml','')return{}}else{varsettings=yml.load(fs.readFileSync(path))// ⬆️ safeLoad -> loadif(!settings)return{}returnsettings}
hexo server --debug
package.json
The text was updated successfully, but these errors were encountered: