{"id":5506,"date":"2022-01-17T07:04:25","date_gmt":"2022-01-16T22:04:25","guid":{"rendered":"https:\/\/greentown.tokyo\/?p=5506"},"modified":"2022-01-18T13:45:33","modified_gmt":"2022-01-18T04:45:33","slug":"direnv","status":"publish","type":"post","link":"https:\/\/greentown.tokyo\/?p=5506","title":{"rendered":"direnv\u306f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3054\u3068\u300c\u74b0\u5883\u300d\u5207\u308a\u66ff\u3048\u3092\u304a\u3053\u306a\u3046 - WebStorm"},"content":{"rendered":"\n<p><span style=\"color: #ff0000;\"><strong>direnv\u306b\u3072\u3068\u3070\u3093\u82e6\u3057\u3081\u3089\u308c\u305f\u306e\u3067\u30e1\u30e2<\/strong><\/span><\/p>\n<p>\u306a\u306b\u3092\u52d8\u9055\u3044\u3057\u3066\u305f\u3093\u304b\u3001<strong><span style=\"color: #0000ff;\">direnv\u306f\u3068\u3042\u308b\u8a00\u8a9e\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u5207\u308a\u66ff\u3048\u3089\u308c\u308b\u30e2\u30ce<\/span><\/strong>\u3068\u3044\u3046\u5148\u5165\u89b3\u304c\u3042\u308a\u3001\u6b63\u89e3\u306b\u8fd1\u3065\u304f\u307e\u3067\u6642\u9593\u304b\u304b\u3063\u3061\u3083\u3063\u305f\u3088\u3002\u3046\u3048\u30fc\u3093\u3002<\/p>\n<p><span style=\"color: #ff0000;\"><span style=\"color: #000000;\">direnv\u306f\u3001<\/span><strong>\u307e\u308b\u3063\u3068\u300c\u74b0\u5883\u300d\u3092\u5165\u308c\u66ff\u3048\u3089\u308c\u308b<\/strong><\/span>\u3068\u3044\u3046\u30b7\u30ed\u30e2\u30ce\uff01node\u3060\u308d\u3046\u304cPostgreSQL\u3060\u308d\u3046\u304cGo\u3060\u308d\u3046\u304c\u4f55\u3067\u3082\u3044\u3044\u3051\u3069\u3001\u3068\u306b\u304b\u304f\u3001\u3068\u3042\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u914d\u4e0b\u306e\u74b0\u5883\u3092\u3054\u3063\u305d\u308a\u5207\u308a\u66ff\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n<p>\u3044\u307e\u8607\u308b\u8a18\u61b6\uff01<\/p>\n<p>\u6570\u5e74\u524d\u3001Women Who Go \u306e \u5e74\u672b\u52c9\u5f37\u4f1a\u300cHumans Who Go Tokyo\u300d\u306b\u306f\u3058\u3081\u3066\u3044\u3063\u305f\u3068\u304d\uff08\u30ea\u30d6\u30bb\u30f3\u30b9\u3055\u3093\u306e\u304a\u3057\u3083\u308c\u306a\u30aa\u30d5\u30a3\u30b9\uff01 \u30b5\u30ed\u30da\u30c3\u30c8\u306e\uff01\u3042\u305f\u307e\u9752\u3044\uff01\u718a\u306e\u307f\u3063\u3061\u30fc\u3055\u3093\u304c\uff01\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9eGo\u306e\u672c\u3092\u8cb8\u3057\u3066\u304f\u308c\u305f\u3002\u3082\u3082\u3055\u3093\u3068\u3042\u304b\u306d\u3055\u3093\u3082\u3044\u3066\u3001\u307f\u3093\u306a\u3084\u3055\u3057\u3044\u3057\u3001\u304a\u3084\u3064\u3044\u3063\u3071\u3044\u3042\u3063\u305f\u3001\u3081\u3063\u3061\u3083\u899a\u3048\u3068\u308b\uff09\u3001\u305d\u3053\u306b\u304d\u3066\u3044\u305fGopher\u304a\u306b\u30fc\u3055\u3093\u304c direnv\u306b\u3064\u3044\u3066\u6559\u3048\u3066\u304f\u308c\u305f\u3093\u3060\u3051\u3069\u3001\u3044\u307e\uff01\u3044\u307e\uff01\uff01\u3042\u3041\u3041\u3041\u30fc\u30fc\u30fc\u3053\u308c\u304b\uff01\u3068\u306a\u3063\u3066\u308b\uff08\u4f7f\u3046\u6a5f\u4f1a\u306a\u304b\u3063\u305f\u306e\u3067&#x1f607;<\/p>\n<p>\u56de\u60f3\u304a\u308f\u308a\u3002<\/p>\n<p>\u3067\u3001\u4f55\u304c\u3057\u305f\u304b\u3063\u305f\u306e\u304b\u3002<\/p>\n<p>\u3053\u3068\u306e\u767a\u7aef\u306f..<\/p>\n<p>Firebase \u306e functions \u3067 \u753b\u50cf\u306e\u30ea\u30b5\u30a4\u30ba\u51e6\u7406\u3092\u4f5c\u3063\u3066\u308b \u2192 sharp \u3068\u3044\u3046\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u5165\u308c\u305f\u3044 \u2192 \u30a8\u30e9\u30fc\u306b\u306a\u308b\u3002<\/p>\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30eb\u30fc\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067&nbsp;<\/p>\n<pre class=\"c-mrkdwn__pre\" data-stringify-type=\"pre\">yarn add sharp<\/pre>\n<p>\u3059\u308b\u3068\u3046\u307e\u304f\u3086\u304f\u306e\u3067\u3059\u304c\u3001functions \u914d\u4e0b\u3067\u3084\u308b\u3068\u3001<\/p>\n<p><span style=\"color: #ff0000;\">functions@: The engine &#8220;node&#8221; is incompatible with this module. Expected version &#8220;12&#8221;. Got &#8220;15.5.0&#8221;<\/span><\/p>\n<p>\u30a8\u30e9\u30fc\u304c\u3067\u308b\u3002<\/p>\n<p><\/p>\n<p>Firebse\u3068\u304bvue\u3068\u304bflutter\u3068\u304b\u3067\u3001\u5927\u5909\u304a\u305b\u308f\u306b\u306a\u3063\u3066\u308b\u30b7\u30f3\u30ae\u30e5\u30e9\u30ea\u30c6\u30a3\u30fb\u30bd\u30b5\u30a8\u30c6\u30a3\u306e\u30a8\u30f3\u30b8\u30cb\u30a2\u3055\u3093\u304b\u3089<\/p>\n<p><a href=\"https:\/\/greentown.tokyo\/wp-content\/uploads\/2022\/01\/advice.jpg\"><img decoding=\"async\" src=\"https:\/\/greentown.tokyo\/wp-content\/uploads\/2022\/01\/advice-300x268.jpg\" alt=\"\" width=\"300\" height=\"268\" class=\"alignnone size-medium wp-image-5509\" srcset=\"https:\/\/greentown.tokyo\/wp-content\/uploads\/2022\/01\/advice-300x268.jpg 300w, https:\/\/greentown.tokyo\/wp-content\/uploads\/2022\/01\/advice.jpg 411w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u30a2\u30c9\u30d0\u30a4\u30b9\u3082\u3089\u3063\u305f\u306e\u3002<\/p>\n<p>functions\/src\/functions\/package.json\u3092\u7de8\u96c6\u3059\u308b\u300112\u309216\u306b<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-json\" data-file=\"functions\/src\/functions\/package.json\" data-lang=\"JSON\"><code>  &quot;engines&quot;: {\n    &quot;node&quot;: &quot;16&quot;\n  },<\/code><\/pre><\/div>\n\n\n\n<p>direnv\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3001<span style=\"background-color: #f2f2f2;\">.zshrc <\/span>\u306b\u4ee5\u4e0b\u3092\u66f8\u304f&#8230;&#8230;<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-bash\" data-file=\".zshrc\" data-lang=\"Bash\"><code>export EDITOR=hogehoge\neval &quot;$(direnv hook zsh)&quot;<\/code><\/pre><\/div>\n\n\n\n<p>hogehoge\u306e\u3068\u3053\u308d\u306b\u3001\u4f7f\u7528\u3057\u3066\u3044\u308b\u30a8\u30c7\u30a3\u30bf\u3092\u66f8\u304f\u306e\u3060\u3051\u3069\u3001\u81ea\u5206\u306fWebStorm\u4f7f\u3063\u3066\u3066\u3001\u306a\u3093\u3066\u66f8\u3051\u3070\u3048\u3048\u3093\u3084&#8230;\u3063\u3066\u306a\u3063\u3066\u6570\u6642\u9593\u8abf\u3079\u3066\u3066\u6642\u9593\u304f\u3063\u305f\u3002\uff08\u3069\u3063\u304b\u306e\u30b5\u30a4\u30c8\u306bJetbrain\u306eToolbox\u3067webstorm\u7528\u306e\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u751f\u6210\u3057\u3066\u305d\u308c\u4f7f\u3048\u308b\u3067\uff01\u7684\u306a\u3053\u3068\u304c\u66f8\u3044\u3066\u3042\u3063\u305f\u3093\u3060\u3051\u3069\u3001\u751f\u6210\u3055\u308c\u306a\u304b\u3063\u305f\u3088\u3002<a href=\"https:\/\/www.jetbrains.com\/help\/idea\/working-with-the-ide-features-from-command-line.html#toolbox\">\u516c\u5f0f\u30b5\u30a4\u30c8<\/a>\u3082\u307f\u3066\u307f\u305f\u3093\u3060\u3051\u3069\u751f\u6210\u3055\u308c\u305a\u3002toolbox\u306e\u518d\u8d77\u52d5\u3082\u3057\u305f\u306e\u3088\uff1f\uff09<\/p>\n<p>\u3067\u3001\u7d50\u5c40\u306e\u3068\u306e\u308d\u3001<span style=\"background-color: #ebebeb;\">export EDITOR=hogehoge<\/span> \u306f\u5225\u306b\u5fc5\u8981\u306a\u304f\u3063\u3066<\/p>\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30eb\u30fc\u30c8\u30d5\u30a9\u30eb\u30c0\u3068\u304b\u306b <span style=\"background-color: #ebebeb;\">.envrc<\/span> \u3092\u4f5c\u308c\u3070\u826f\u3044\u3002<\/p>\n<p><\/p>\n<p>\u3053\u3053\u304b\u3089\u899a\u66f8\u3002<\/p>\n<h3>direnv\u3067node\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406<\/h3>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-plain\" data-file=\"tarminal\"><code>&#x1f33c; % git clone https:\/\/github.com\/direnv\/direnv\n&#x1f33c; % cd direnv\n&#x1f33c; % sudo make install<\/code><\/pre><\/div>\n\n\n\n<p>\u304b<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-plain\" data-file=\"tarminal\"><code>&#x1f33c; % brew install direnv<\/code><\/pre><\/div>\n\n\n\n<p><span style=\"background-color: #e3e3e3;\">&nbsp;~.\/zshrc&nbsp;<\/span> \u306bhook\u3092\u8ffd\u52a0\u3059\u308b<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-plain\" data-file=\".zshrc\"><code>eval &quot;$(direnv hook zsh)&quot;<\/code><\/pre><\/div>\n\n\n\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30eb\u30fc\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067 \u3001<span style=\"background-color: #f0f0f0;\"> touch .envrc&nbsp;<\/span> \u3068&nbsp;<span style=\"background-color: #f0f0f0;\"> direnv allow&nbsp;<\/span> \u3059\u308b<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-plain\" data-file=\"tarminal\"><code>&#x1f33c; % touch .envrc\ndirenv: error \/Users\/hogefuga\/project\/.envrc is blocked. Run `direnv allow` to approve its content        \n3:05:25 \n&#x1f33c; % direnv allow\ndirenv: loading ~\/project\/.envrc   <\/code><\/pre><\/div>\n\n\n\n<p><span style=\"background-color: #ebebeb;\">&nbsp;.nvmrc&nbsp;<\/span> \u3092\u4f5c\u308b<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-plain\" data-file=\".nvmrc\"><code>16.13.2<\/code><\/pre><\/div>\n\n\n\n<p><span style=\"background-color: #f0f0f0;\"> .envrc&nbsp;<\/span>\u3092\u7de8\u96c6\u3059\u308b<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-plain\" data-file=\".envrc\"><code>nvmrc=~\/.nvm\/nvm.sh\nsource $nvmrc\nnvm use<\/code><\/pre><\/div>\n\n\n\n<p>16.13.2\u3092\u5165\u308c\u308b\u306e\u3060\u30fc<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-plain\"><code>&#x1f33c; % nvm install v16.13.2<\/code><\/pre><\/div>\n\n\n\n<p>\u3067\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-plain\" data-file=\"tarminal\"><code>&#x1f33c; % node --version\nv16.13.2\ndirenv: error \/Users\/hogefuga\/project\/.envrc is blocked. Run `direnv allow` to approve its content        \n4:28:04 \n&#x1f33c; % direnv allow<\/code><\/pre><\/div>\n\n\n\n<p>\u3067\u304d\u305f\uff01\u3002\u306a\u3093\u304b&nbsp;<span style=\"background-color: #e8e8e8;\"> direnv allow&nbsp;<\/span> \u3057\u3066\u304f\u308c\u3084\uff01\u3063\u3066\u3067\u305f\u3051\u3069\u3002<\/p>\n<p>\u3061\u3083\u3093\u3068functions\u4ee5\u4e0b\u3082 v16.13.2 \u306b\u306a\u3063\u3066\u308b\u3002<\/p>\n<p>\u3042\u3068\u306f\u809d\u5fc3\u306e\u3001<span style=\"background-color: #e8e8e8;\"> yarn add sharp&nbsp;<\/span> \u3084\u3067\uff01<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-plain\"><code>&#x1f33c; % yarn add sharp     \nyarn add v1.22.17\n :\n&#x2728;  Done in 23.55s.<\/code><\/pre><\/div>\n\n\n\n<p>\u3075\u3058\u306b\u5165\u3063\u305f&#8230;\u3002<\/p>\n<p>\u308f\u304b\u3063\u3066\u3057\u307e\u3048\u3070\u306a\u3093\u3066\u3053\u3068\u306a\u3044\u3093\u3060\u3051\u3069\u3001\u52c9\u5f37\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<h5>\u307e\u3068\u3081\u3068\u8ffd\u8a18:<\/h5>\n<ul>\n<li>node\u306e\u5b9f\u884c\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3054\u3068\u4e00\u62ec\u306b\u5909\u66f4\u3059\u308b\u306b\u306f\u3001direnv\u3002<\/li>\n<li>yarn add sharp\u304c\u3044\u308c\u3089\u308c\u306a\u304b\u3063\u305f\u306e\u306f\u3001package.json\u306enode\u306e\u6307\u5b9a\u304c12\u306b\u306a\u3063\u3066\u3044\u305f\u305f\u3081\u3001\u5b9f\u884c\u74b0\u5883\u306enode\u30d0\u30fc\u30b8\u30e7\u30f3\u306bpackage.json\u306b\u8a18\u8f09\u3057\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u3042\u308f\u305b\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f\u3002<\/li>\n<li>typescript\u4f7f\u3063\u3066\u3044\u308b\u306e\u3067\u3001yarn add sharp \u3067\u306f\u3060\u3081\uff08\u3053\u308c\u306f<a href=\"https:\/\/greentown.tokyo\/ts7016\/\">\u3053\u3061\u3089<\/a>\u306e\u8a18\u4e8b\u3067\uff09<\/li>\n<\/ul>\n<p><\/p>\n<p>\u6c17\u3065\u3051\u30704\u664252\u5206..\u7d9a\u304d\u306f\u307e\u305f\u6b21\u5973\u3068\u9577\u7537\u9001\u308a\u51fa\u3057\u305f\u3089\u3084\u308d\u3046\u3002<\/p>\n<p>\u3053\u306e\u307e\u307e\u3060\u3068\u663c\u307e\u3067\u5bdd\u3066\u3057\u307e\u3044\u305d\u3046\u306a\u306e\u3067\uff08\u6b21\u5973\u306e\u5f01\u5f53\u4f5c\u308a\u304c\u3042\u308b&#8230;\u4ed5\u4e8b\u3082\u3042\u308b\uff09\u3001\u671d\uff15\u6642\u9593\u3089\u306eFlutter\u52c9\u5f37\u4f1a\u306b\u7533\u3057\u8fbc\u307f\u307e\u3057\u305f\u3002\u3061\u3087\u3063\u3068\u3044\u3063\u3066\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&quot;engines&quot;: { &quot;node&quot;: &quot;16&quot; }, export EDITOR=hogehoge eval &quot;$(diren &#8230; <\/p>\n","protected":false},"author":1,"featured_media":5514,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[79,106],"tags":[],"class_list":["post-5506","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-note","category-vue-js"],"_links":{"self":[{"href":"https:\/\/greentown.tokyo\/index.php?rest_route=\/wp\/v2\/posts\/5506"}],"collection":[{"href":"https:\/\/greentown.tokyo\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/greentown.tokyo\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/greentown.tokyo\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/greentown.tokyo\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5506"}],"version-history":[{"count":14,"href":"https:\/\/greentown.tokyo\/index.php?rest_route=\/wp\/v2\/posts\/5506\/revisions"}],"predecessor-version":[{"id":5530,"href":"https:\/\/greentown.tokyo\/index.php?rest_route=\/wp\/v2\/posts\/5506\/revisions\/5530"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/greentown.tokyo\/index.php?rest_route=\/wp\/v2\/media\/5514"}],"wp:attachment":[{"href":"https:\/\/greentown.tokyo\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/greentown.tokyo\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5506"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/greentown.tokyo\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}