{"id":9,"date":"2024-05-25T17:05:39","date_gmt":"2024-05-25T08:05:39","guid":{"rendered":"https:\/\/blog.hy2t.com\/?p=9"},"modified":"2024-07-02T02:44:54","modified_gmt":"2024-07-01T17:44:54","slug":"nuxt3%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"https:\/\/hy2t.com\/?p=9","title":{"rendered":"Nuxt3 bun\u3067\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u3092\u7c21\u5358\u306b\u69cb\u7bc9\u3059\u308b"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">bun\u3068\u3044\u3046\u306e\u3092\u6700\u8fd1\u77e5\u3063\u305f\u306e\u3067\u3068\u308a\u3042\u3048\u305abun\u3067\u3084\u3063\u3066\u307f\u308b<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code># bun\u306einstall\u304b\u3089\ncurl -fsSL https:\/\/bun.sh\/install | bash\nsource ~\/.bash_profile\nbun -v\n  =&gt; 1.1.10\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">bun\u306einstall\u3092\u5b8c\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">nuxt\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u308a\u307e\u3059<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-0a4f1775148abb69a07416f5b059446e\"><code># project\u4f5c\u6210\nbunx nuxi@latest init nuxt_sample\n\n WARN  Current version of Node.js (16.19.1) is unsupported and might cause issues.                                                                16:14:22\n       Please upgrade to a compatible version &gt;= 18.0.0.\n\n\n ERROR  Error: Failed to download template from registry: h is not a function\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">node\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u4f4e\u3044\u3068<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5165\u308c\u305f\u306e\u306f\u7d50\u69cb\u524d\u3060\u3063\u305f\u306e\u3067\u3001\u4ed5\u65b9\u306a\u3044<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/nvm-sh\/nvm\">nvm<\/a>\u3092\u5165\u308c\u307e\u3059<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code># install\ncurl -o- https:\/\/raw.githubusercontent.com\/nvm-sh\/nvm\/v0.39.7\/install.sh | bash\n\n# \u5b9f\u884c\u3057\u308d\u3068\u51fa\u3066\u304f\u308b\nexport NVM_DIR=\"$(&#91; -z \"${XDG_CONFIG_HOME-}\" ] &amp;&amp; printf %s \"${HOME}\/.nvm\" || printf %s \"${XDG_CONFIG_HOME}\/nvm\")\"\n&#91; -s \"$NVM_DIR\/nvm.sh\" ] &amp;&amp; \\. \"$NVM_DIR\/nvm.sh\" # This loads nvm\n\n# \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\nnvm ls-remote\n\nnvm install v22.2.0\nnvm use v22.2.0\n\n# node\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u78ba\u8a8d\nnode -v\n  =&gt; v22.2.0<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6539\u3081\u3066nuxt\u3067\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-06eadb44bf4f750f9fb21a2700a9142c\"><code>bunx nuxi@latest init nuxt_sample\n\n# \u306a\u3093\u304b\u30a8\u30e9\u30fc\u51fa\u308b\u3002\u3002\n\u25d0 Installing dependencies...                                                                                                                           16:25:49\nbun install v1.1.10 (5102a944)\n  \ud83d\udd0d postcss-reduce-transforms &#91;739\/971]\nGET https:\/\/registry.npmjs.org\/postcss-reduce-transforms - 500\n  \ud83d\ude9a stylehacks &#91;1899\/2124]\nGET https:\/\/registry.npmjs.org\/cac\/-\/cac-6.7.14.tgz - 500\nerror: postcss-reduce-transforms@^6.0.2 failed to resolve\n\n# \u3053\u308c\u306a\u3089install\u3067\u304d\u308b\nNUXT_TELEMETRY_DISABLED=1 bunx nuxi@latest init nuxt_sample\n\ncd nuxt_sample\nbun run dev<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">nuxt\u306f\u54c1\u8cea\u5411\u4e0a\u306e\u305f\u3081\u304b\u3001\u533f\u540d\u3067\u5229\u7528\u72b6\u6cc1\u3068\u304b\u3092\u30c7\u30fc\u30bf\u3092\u9001\u4fe1\u3057\u3066\u3044\u308b\u3089\u3057\u3044\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> NUXT_TELEMETRY_DISABLED \u306f\u305d\u308c\u3092\u7121\u52b9\u306b\u3059\u308b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">http:\/\/localhost:3000\/\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"550\" src=\"https:\/\/blog.hy2t.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-25-16.49.22-1024x550.png\" alt=\"\" class=\"wp-image-10\" srcset=\"https:\/\/hy2t.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-25-16.49.22-1024x550.png 1024w, https:\/\/hy2t.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-25-16.49.22-300x161.png 300w, https:\/\/hy2t.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-25-16.49.22-768x413.png 768w, https:\/\/hy2t.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-25-16.49.22.png 1433w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u4f5c\u308c\u307e\u3057\u305f\u3002\u601d\u3063\u305f\u3088\u308a\u3064\u307e\u3065\u304b\u306a\u304b\u3063\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>bun\u3068\u3044\u3046\u306e\u3092\u6700\u8fd1\u77e5\u3063\u305f\u306e\u3067\u3068\u308a\u3042\u3048\u305abun\u3067\u3084\u3063\u3066\u307f\u308b bun\u306einstall\u3092\u5b8c\u4e86\u3002 nuxt\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u308a\u307e\u3059 node\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u4f4e\u3044\u3068 \u5165\u308c\u305f\u306e\u306f\u7d50\u69cb\u524d\u3060\u3063\u305f\u306e\u3067\u3001\u4ed5\u65b9\u306a\u3044 nvm\u3092\u5165\u308c\u307e\u3059 \u6539\u3081\u3066n [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":74,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"footnotes":""},"categories":[12],"tags":[2],"class_list":["post-9","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-12","tag-nuxt"],"_links":{"self":[{"href":"https:\/\/hy2t.com\/index.php?rest_route=\/wp\/v2\/posts\/9","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hy2t.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hy2t.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hy2t.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hy2t.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9"}],"version-history":[{"count":2,"href":"https:\/\/hy2t.com\/index.php?rest_route=\/wp\/v2\/posts\/9\/revisions"}],"predecessor-version":[{"id":19,"href":"https:\/\/hy2t.com\/index.php?rest_route=\/wp\/v2\/posts\/9\/revisions\/19"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hy2t.com\/index.php?rest_route=\/wp\/v2\/media\/74"}],"wp:attachment":[{"href":"https:\/\/hy2t.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hy2t.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hy2t.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}