我计划使用hexo
创建我的GitHub博客,当我运行hexo init
时,它显示如下:
$ hexo init
INFO Cloning hexo-starter to E:\Blog
Cloning into 'E:\Blog'...
remote: Counting objects: 65, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 65 (delta 0), reused 0 (delta 0), pack-reused 62
Unpacking objects: 100% (65/65), done.
Submodule 'themes/landscape' (https://github.com/hexojs/hexo-theme-
landscape.git ) registered for
path 'themes/landscape'
Cloning into 'E:/Blog/themes/landscape'...
remote: Counting objects: 819, done.
remote: Total 819 (delta 0), reused 0 (delta 0), pack-reused 819
Receiving objects: 100% (819/819), 2.54 MiB | 1.85 MiB/s, done.
Resolving deltas: 100% (432/432), done.
Submodule path 'themes/landscape': checked out
'73a23c51f8487cfcd7c6deec96ccc754
3960d350'
INFO Install dependencies
▒▒Ϣ: ▒▒▒ṩ▒▒ģʽ▒▒▒ҵ▒▒ļ▒▒▒
'npm' ▒▒▒▒▒ڲ▒▒▒▒ⲿ▒▒▒Ҳ▒▒▒ǿ▒▒▒▒еij▒▒▒
▒▒▒▒▒▒▒▒▒ļ▒▒▒
WARN Failed to install dependencies. Please run 'npm install' manually!
因此无法安装依赖项,因此我通过运行npm install
手动添加依赖项,并显示以下问题:
> nunjucks@3.1.2 postinstall E:\Blog\node_modules\nunjucks
> node postinstall-build.js src
'node' ▒▒▒▒▒ڲ▒▒▒▒ⲿ▒▒▒Ҳ▒▒▒ǿ▒▒▒▒еij▒▒▒
▒▒▒▒▒▒▒▒▒ļ▒▒▒
npm WARN rollback Rolling back ajv@4.11.8 failed (this is probably
harmless): EP ERM: operation
not permitted, lstat 'E:\Blog\node_modules\fsevents\node_modules'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3
(node_modules\fse vents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for
fsevents@ 1.1.3: wanted
{"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nunjucks@3.1.2 postinstall: `node postinstall-build.js src`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nunjucks@3.1.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional
log ging output above.
有谁知道如何解决这个问题?
答案 0 :(得分:1)
您可以尝试sudo npm install
或npm install
然后hexo g
和hexo s
完成: INFO开始处理 INFO Hexo在http://localhost:4000上运行。按Ctrl + C停止。
答案 1 :(得分:0)
我今天也遇到了这个问题,并使用cnpm而不是npm来解决它。
new AlertDialog.Builder(v.getContext()).setMessage("msg to display!").show();