Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
npm notice created a lockfile as package-lock.json. You should commit this file. added 445 packages from 499 contributors and audited 2632 packages in 39.333s
5 packages are looking for funding run `npm fund` for details
found 0 vulnerabilities
INFO Start blogging with Hexo! ldd@MacBook-Pro blog % ldd@MacBook-Pro blog % ldd@MacBook-Pro blog % ls _config.yml package.json themes node_modules scaffolds package-lock.json source
INFO Checking dependencies ERROR Package cheerio is not installed. ERROR Package hexo-renderer-sass is not installed. ERROR Please install the missing dependencies in the root directory of your Hexo site.
按提示信息发现是缺少了2个组件,需要先安装。
6、安装cheerio和hexo-renderer-sass组件
用npm命令先安装cheerio,这个可以正常安装,如下提示:
1 2 3 4 5 6 7 8 9 10 11 12 13
npm install cheerio npm WARN saveError ENOENT: no such file or directory, open '/private/var/root/package.json' npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN enoent ENOENT: no such file or directory, open '/private/var/root/package.json' npm WARN root No description npm WARN root No repository field. npm WARN root No README data npm WARN root No license field.
+ cheerio@1.0.0-rc.3 added 19 packages from 51 contributors and audited 34 packages in 6.621s found 0 vulnerabilities
Error: EACCES: permission denied, uv_cwd at process.wrappedCwd [as cwd] (internal/bootstrap/switches/does_own_process_state.js:128:26) at Object.resolve (path.js:978:47) at patchProcessObject (internal/bootstrap/pre_execution.js:89:28) at prepareMainThreadExecution (internal/bootstrap/pre_execution.js:16:3) at internal/main/run_main_module.js:7:1 { errno: -13, code: 'EACCES', syscall: 'uv_cwd' } npm WARN enoent ENOENT: no such file or directory, open '/private/var/root/package.json' npm WARN hexo-renderer-sass@0.4.0 requires a peer of hexo@>= 3 but none is installed. You must install peer dependencies yourself. npm WARN root No description npm WARN root No repository field. npm WARN root No README data npm WARN root No license field.
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@4.13.1 install: `node scripts/install.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@4.13.1 install 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! /var/root/.npm/_logs/2020-03-16T11_02_43_283Z-debug.log
改用淘宝镜像:
1 2
npm install -g cnpm --registry=https://registry.npm.taobao.org npm config set registry https://registry.npm.taobao.org