ブログ - (2号機) hexoをインストール
静的コンテンツ生成ツールで,以前HUGOを試して見たけれど,今回はHexo(ヘクソ)を試して見る.名前が,声に出して言いにくいなぁ...
まずは,最初にnode.jsのバージョンを確認.
npmを使って,インストールを実施.
権限不足らしい.sudoで実行.
まだまだエラー出ているなぁ...
unsafe-permオプションをつける.
問題なくインストール完了した模様.
ちなみに,最初からsudoのunsafe-permオプションつけて実行したものがこちら.
軽くワーニング出ているけど,まぁいいか.
まずは,最初にnode.jsのバージョンを確認.
$ node -v🆑
v11.14.0
$ npm -v🆑
6.7.0
$
$ npm install hexo-cli -g🆑
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied🈁, access '/usr/local/lib/node_modules'
npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR! stack:
npm ERR! "Error: EACCES: permission denied, access '/usr/local/lib/node_modules'",
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as
the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please
double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/server/.npm/_logs/2019-04-18T15_06_08_043Z-debug.log
$
$ sudo npm install hexo-cli -g🆑
WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.
To proceed, enter your password, or type Ctrl-C to abort.
Password:
/usr/local/bin/hexo -> /usr/local/lib/node_modules/hexo-cli/bin/hexo
> fsevents@1.2.8 install /usr/local/lib/node_modules/hexo-cli/node_modules/fsevents
> node install
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for fsevents@1.2.8 and node@11.14.0
(node-v67 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied,
mkdir '/usr/local/lib/node_modules/hexo-cli/node_modules/fsevents/lib'
gyp WARN EACCES user "root" does not have permission to access the dev dir
"/Users/server/.node-gyp/11.14.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir
"/usr/local/lib/node_modules/hexo-cli/node_modules/fsevents/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir
'/usr/local/lib/node_modules/hexo-cli/node_modules/fsevents/.node-gyp'
gyp ERR! System Darwin 15.6.0
gyp ERR! command "/usr/local/bin/node"
"/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"configure" "--fallback-to-build"
"--module=/usr/local/lib/node_modules/hexo-cli/node_modules/fsevents
/lib/binding/Release/node-v67-darwin-x64/fse.node"
"--module_name=fse" "--module_path=/usr/local/lib/node_modules/hexo-cli
/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64"
"--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0"
"--node_napi_label=node-v67"
gyp ERR! cwd /usr/local/lib/node_modules/hexo-cli/node_modules/fsevents
gyp ERR! node -v v11.14.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node
/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
configure --fallback-to-build
--module=/usr/local/lib/node_modules/hexo-cli/node_modules/fsevents
/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse
--module_path=/usr/local/lib/node_modules/hexo-cli/node_modules/fsevents
/lib/binding/Release/node-v67-darwin-x64 --napi_version=4
--node_abi_napi=napi --napi_build_version=0
--node_napi_label=node-v67' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous>
(/usr/local/lib/node_modules/hexo-cli/node_modules
/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:193:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:999:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:266:5)
node-pre-gyp ERR! System Darwin 15.6.0
node-pre-gyp ERR! command "/usr/local/bin/node"
"/usr/local/lib/node_modules/hexo-cli/node_modules/fsevents
/node_modules/node-pre-gyp/bin/node-pre-gyp" "install"
"--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/hexo-cli/node_modules/fsevents
node-pre-gyp ERR! node -v v11.14.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm
/node_modules/node-gyp/bin/node-gyp.js
configure --fallback-to-build --module=/usr/local/lib/node_modules
/hexo-cli/node_modules/fsevents/lib/binding/Release
/node-v67-darwin-x64/fse.node --module_name=fse
--module_path=/usr/local/lib/node_modules/hexo-cli/node_modules
/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=4
--node_abi_napi=napi --napi_build_version=0
--node_napi_label=node-v67' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.8
(node_modules/hexo-cli/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.8
install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ hexo-cli@1.1.0
added 225 packages from 434 contributors in 11.876s
$
unsafe-permオプションをつける.
$ sudo npm install hexo-cli -g --unsafe-perm🆑
/usr/local/bin/hexo -> /usr/local/lib/node_modules/hexo-cli/bin/hexo
> fsevents@1.2.8 install /usr/local/lib/node_modules/hexo-cli/node_modules/fsevents
> node install
node-pre-gyp WARN Using needle for node-pre-gyp https download
[fsevents] Success: "/usr/local/lib/node_modules
/hexo-cli/node_modules/fsevents/lib/binding/Release
/node-v67-darwin-x64/fse.node" is installed via remote
+ hexo-cli@1.1.0
added 68 packages from 33 contributors and updated 1 package in 6.508s
$
ちなみに,最初からsudoのunsafe-permオプションつけて実行したものがこちら.
$ sudo npm install hexo-cli -g --unsafe-perm🆑
Password:🆑
/usr/local/bin/hexo -> /usr/local/lib/node_modules/hexo-cli/bin/hexo
> fsevents@1.2.8 install /usr/local/lib/node_modules/hexo-cli/node_modules/fsevents
> node install
node-pre-gyp WARN Using needle for node-pre-gyp https download
[fsevents] Success: "/usr/local/lib/node_modules/hexo-cli/node_modules
/fsevents/lib/binding/Release/node-v67-darwin-x64
/fse.node" is installed via remote
+ hexo-cli@1.1.0
added 293 packages from 458 contributors in 11.245s
$