Reputation: 55
I am planning to use hexo
to create my GitHub blog, When I run hexo init
, it shows as follows:
$ 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!
So it failed to install a dependency, so I manually add dependency by running npm install
, and It shows the following issues:
> [email protected] postinstall E:\Blog\node_modules\nunjucks
> node postinstall-build.js src
'node' ▒▒▒▒▒ڲ▒▒▒▒ⲿ▒▒▒Ҳ▒▒▒ǿ▒▒▒▒еij▒▒▒
▒▒▒▒▒▒▒▒▒ļ▒▒▒
npm WARN rollback Rolling back [email protected] failed (this is probably
harmless): EP ERM: operation
not permitted, lstat 'E:\Blog\node_modules\fsevents\node_modules'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]
(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! [email protected] postinstall: `node postinstall-build.js src`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional
log ging output above.
Does anyone knows how to solve this problem?
Upvotes: 1
Views: 1172
Reputation: 11
you can try sudo npm install
or npm install
then hexo g
and hexo s
Finish: INFO Start processing INFO Hexo is running at http://localhost:4000 . Press Ctrl+C to stop.
Upvotes: 1
Reputation: 103
I also encountered this problem today and solved it by using cnpm instead of npm.
cd your-dir-need-nunjucks
cnpm install
Upvotes: 0