{"id":88,"date":"2024-04-17T07:14:24","date_gmt":"2024-04-17T01:44:24","guid":{"rendered":"https:\/\/ankitbarla.in\/blog\/?p=88"},"modified":"2024-04-17T07:18:24","modified_gmt":"2024-04-17T01:48:24","slug":"how-to-build-your-vite-project-on-freebsd","status":"publish","type":"post","link":"https:\/\/ankitbarla.in\/blog\/how-to-build-your-vite-project-on-freebsd\/","title":{"rendered":"How to build your vite project on freeBSD"},"content":{"rendered":"\n<p>FreeBSD is a open source operating system that powers modern servers. I use a free hosting service provided by <a href=\"https:\/\/www.serv00.com\/\">serv00<\/a> to host my personal projects, They also support git repositories and SSH access. The server where I host my projects runs on FreeBSD. I carry out most of development work on debian where I never encountered a problem while building the project. Recently I was trying to build my vite project on the server when I encountered a problem that looked something like this &#8211;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Error: Your current platform \"freebsd\" and architecture \"x64\" combination is not yet supported by the native Rollup build. Please use the WASM build \"@rollup\/wasm-node\" instead.<\/code><\/pre>\n\n\n\n<p>A quick google search returned links to github issues and some posts made by people who encountered the same problem. It was suggested by some github users to add <code>overrides<\/code> to my <code>package.json<\/code> file. <\/p>\n\n\n\n<p>I added the following lines to my <code>package.json<\/code> file &#8211;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\"overrides\": {\n\"vite\": {\n\"rollup\": \"npm:@rollup\/wasm-node\"\n  }\n}<\/code><\/pre>\n\n\n\n<p>Then removed my <code>package-lock.json<\/code> file as suggested by some github user before running  <code>npm i @rollup\/wasm-node --save dev<\/code> to install the suggested package.<\/p>\n\n\n\n<p>I tried building the project again and it was successful this time. You really need to remove the <code>package-lock.json<\/code> file first to make it work.<\/p>\n\n\n\n<p>Initially I also tried replacing the contents of <code>node_modules\/rollup<\/code> directory with the contents of <code>node_modules\/@rollup\/wasm-node<\/code> and was able to build the project. It works But it\u2019s not really a recommended way of doing things.<\/p>\n\n\n\n<p>Please leave a comment if you have encountered similar issues while builiding a vite project.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>FreeBSD is a open source operating system that powers modern servers. I use a free hosting service provided by serv00 to host my personal projects, They also support git repositories and SSH access. The server where I host my projects runs on FreeBSD. I carry out most of development work on debian where I never [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[16,17,15],"class_list":["post-88","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-rollup-wasm-node","tag-freebsd","tag-vite"],"blocksy_meta":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to build your vite project on freeBSD - Ankit Barla&#039;s Web development blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ankitbarla.in\/blog\/how-to-build-your-vite-project-on-freebsd\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to build your vite project on freeBSD - Ankit Barla&#039;s Web development blog\" \/>\n<meta property=\"og:description\" content=\"FreeBSD is a open source operating system that powers modern servers. I use a free hosting service provided by serv00 to host my personal projects, They also support git repositories and SSH access. The server where I host my projects runs on FreeBSD. I carry out most of development work on debian where I never [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ankitbarla.in\/blog\/how-to-build-your-vite-project-on-freebsd\/\" \/>\n<meta property=\"og:site_name\" content=\"Ankit Barla&#039;s Web development blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-17T01:44:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-17T01:48:24+00:00\" \/>\n<meta name=\"author\" content=\"Ankit Barla\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/BarlaX88\" \/>\n<meta name=\"twitter:site\" content=\"@BarlaX88\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ankit Barla\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ankitbarla.in\/blog\/how-to-build-your-vite-project-on-freebsd\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/ankitbarla.in\/blog\/how-to-build-your-vite-project-on-freebsd\/\"},\"author\":{\"name\":\"Ankit Barla\",\"@id\":\"https:\/\/ankitbarla.in\/blog\/#\/schema\/person\/f52c5eba87dd6f59cc5ca7c6be2daf78\"},\"headline\":\"How to build your vite project on freeBSD\",\"datePublished\":\"2024-04-17T01:44:24+00:00\",\"dateModified\":\"2024-04-17T01:48:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ankitbarla.in\/blog\/how-to-build-your-vite-project-on-freebsd\/\"},\"wordCount\":223,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/ankitbarla.in\/blog\/#\/schema\/person\/f52c5eba87dd6f59cc5ca7c6be2daf78\"},\"keywords\":[\"@rollup\/wasm-node\",\"freeBSD\",\"vite\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ankitbarla.in\/blog\/how-to-build-your-vite-project-on-freebsd\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ankitbarla.in\/blog\/how-to-build-your-vite-project-on-freebsd\/\",\"url\":\"https:\/\/ankitbarla.in\/blog\/how-to-build-your-vite-project-on-freebsd\/\",\"name\":\"How to build your vite project on freeBSD - Ankit Barla&#039;s Web development blog\",\"isPartOf\":{\"@id\":\"https:\/\/ankitbarla.in\/blog\/#website\"},\"datePublished\":\"2024-04-17T01:44:24+00:00\",\"dateModified\":\"2024-04-17T01:48:24+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/ankitbarla.in\/blog\/how-to-build-your-vite-project-on-freebsd\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ankitbarla.in\/blog\/how-to-build-your-vite-project-on-freebsd\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ankitbarla.in\/blog\/how-to-build-your-vite-project-on-freebsd\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ankitbarla.in\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to build your vite project on freeBSD\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ankitbarla.in\/blog\/#website\",\"url\":\"https:\/\/ankitbarla.in\/blog\/\",\"name\":\"Ankit Barla's Web development blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/ankitbarla.in\/blog\/#\/schema\/person\/f52c5eba87dd6f59cc5ca7c6be2daf78\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ankitbarla.in\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/ankitbarla.in\/blog\/#\/schema\/person\/f52c5eba87dd6f59cc5ca7c6be2daf78\",\"name\":\"Ankit Barla\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ankitbarla.in\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/ankitbarla.in\/blog\/wp-content\/uploads\/2024\/04\/default_765x625.png\",\"contentUrl\":\"https:\/\/ankitbarla.in\/blog\/wp-content\/uploads\/2024\/04\/default_765x625.png\",\"width\":765,\"height\":625,\"caption\":\"Ankit Barla\"},\"logo\":{\"@id\":\"https:\/\/ankitbarla.in\/blog\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/ankitbarla.in\/\",\"https:\/\/www.linkedin.com\/in\/ankit-barla\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/BarlaX88\"],\"url\":\"https:\/\/ankitbarla.in\/blog\/author\/ankit_barla\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to build your vite project on freeBSD - Ankit Barla&#039;s Web development blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ankitbarla.in\/blog\/how-to-build-your-vite-project-on-freebsd\/","og_locale":"en_US","og_type":"article","og_title":"How to build your vite project on freeBSD - Ankit Barla&#039;s Web development blog","og_description":"FreeBSD is a open source operating system that powers modern servers. I use a free hosting service provided by serv00 to host my personal projects, They also support git repositories and SSH access. The server where I host my projects runs on FreeBSD. I carry out most of development work on debian where I never [&hellip;]","og_url":"https:\/\/ankitbarla.in\/blog\/how-to-build-your-vite-project-on-freebsd\/","og_site_name":"Ankit Barla&#039;s Web development blog","article_published_time":"2024-04-17T01:44:24+00:00","article_modified_time":"2024-04-17T01:48:24+00:00","author":"Ankit Barla","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/BarlaX88","twitter_site":"@BarlaX88","twitter_misc":{"Written by":"Ankit Barla","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ankitbarla.in\/blog\/how-to-build-your-vite-project-on-freebsd\/#article","isPartOf":{"@id":"https:\/\/ankitbarla.in\/blog\/how-to-build-your-vite-project-on-freebsd\/"},"author":{"name":"Ankit Barla","@id":"https:\/\/ankitbarla.in\/blog\/#\/schema\/person\/f52c5eba87dd6f59cc5ca7c6be2daf78"},"headline":"How to build your vite project on freeBSD","datePublished":"2024-04-17T01:44:24+00:00","dateModified":"2024-04-17T01:48:24+00:00","mainEntityOfPage":{"@id":"https:\/\/ankitbarla.in\/blog\/how-to-build-your-vite-project-on-freebsd\/"},"wordCount":223,"commentCount":1,"publisher":{"@id":"https:\/\/ankitbarla.in\/blog\/#\/schema\/person\/f52c5eba87dd6f59cc5ca7c6be2daf78"},"keywords":["@rollup\/wasm-node","freeBSD","vite"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ankitbarla.in\/blog\/how-to-build-your-vite-project-on-freebsd\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ankitbarla.in\/blog\/how-to-build-your-vite-project-on-freebsd\/","url":"https:\/\/ankitbarla.in\/blog\/how-to-build-your-vite-project-on-freebsd\/","name":"How to build your vite project on freeBSD - Ankit Barla&#039;s Web development blog","isPartOf":{"@id":"https:\/\/ankitbarla.in\/blog\/#website"},"datePublished":"2024-04-17T01:44:24+00:00","dateModified":"2024-04-17T01:48:24+00:00","breadcrumb":{"@id":"https:\/\/ankitbarla.in\/blog\/how-to-build-your-vite-project-on-freebsd\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ankitbarla.in\/blog\/how-to-build-your-vite-project-on-freebsd\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/ankitbarla.in\/blog\/how-to-build-your-vite-project-on-freebsd\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ankitbarla.in\/blog\/"},{"@type":"ListItem","position":2,"name":"How to build your vite project on freeBSD"}]},{"@type":"WebSite","@id":"https:\/\/ankitbarla.in\/blog\/#website","url":"https:\/\/ankitbarla.in\/blog\/","name":"Ankit Barla's Web development blog","description":"","publisher":{"@id":"https:\/\/ankitbarla.in\/blog\/#\/schema\/person\/f52c5eba87dd6f59cc5ca7c6be2daf78"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ankitbarla.in\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/ankitbarla.in\/blog\/#\/schema\/person\/f52c5eba87dd6f59cc5ca7c6be2daf78","name":"Ankit Barla","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ankitbarla.in\/blog\/#\/schema\/person\/image\/","url":"https:\/\/ankitbarla.in\/blog\/wp-content\/uploads\/2024\/04\/default_765x625.png","contentUrl":"https:\/\/ankitbarla.in\/blog\/wp-content\/uploads\/2024\/04\/default_765x625.png","width":765,"height":625,"caption":"Ankit Barla"},"logo":{"@id":"https:\/\/ankitbarla.in\/blog\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/ankitbarla.in\/","https:\/\/www.linkedin.com\/in\/ankit-barla\/","https:\/\/x.com\/https:\/\/twitter.com\/BarlaX88"],"url":"https:\/\/ankitbarla.in\/blog\/author\/ankit_barla\/"}]}},"_links":{"self":[{"href":"https:\/\/ankitbarla.in\/blog\/wp-json\/wp\/v2\/posts\/88","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ankitbarla.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ankitbarla.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ankitbarla.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ankitbarla.in\/blog\/wp-json\/wp\/v2\/comments?post=88"}],"version-history":[{"count":3,"href":"https:\/\/ankitbarla.in\/blog\/wp-json\/wp\/v2\/posts\/88\/revisions"}],"predecessor-version":[{"id":92,"href":"https:\/\/ankitbarla.in\/blog\/wp-json\/wp\/v2\/posts\/88\/revisions\/92"}],"wp:attachment":[{"href":"https:\/\/ankitbarla.in\/blog\/wp-json\/wp\/v2\/media?parent=88"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ankitbarla.in\/blog\/wp-json\/wp\/v2\/categories?post=88"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ankitbarla.in\/blog\/wp-json\/wp\/v2\/tags?post=88"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}