Apologies, the process failed due to the following error: "bunsh: No such file or directory running bun dev

Today I switched to using Windows and decided to install Bun. However, when I tried running the script "bun dev", I encountered the following error message:

Error: Failed due to error: bunsh: No such file or directory.

Interestingly, when I run the same command in the terminal, it works fine. Here's the content of my package.json file:

{
  
"name": "app",
  
"version": "1.0.50",
  
"scripts": {

    "dev": "bun --watch run src/index.ts"

  },

 "module": "src/index.js"

}

I've already attempted adding a "./" in front of the src/index.ts, as well as running the script with just index.ts in the src directory, but neither approach resolved the issue.

Answer №1

Had a similar issue myself recently, which I managed to solve in a slightly different way. It turned out that the problem stemmed from having special characters in my project folder name. Once I renamed the folder using only standard English characters, everything worked smoothly.

If changing the folder name doesn't work for you, another troubleshooting step could be checking the npm/node versions to ensure compatibility. If that still doesn't resolve the issue, digging into node logs might provide some useful insights. In my situation, npm behaved fine while bun had issues, indicating a potential bug in the system.

Answer №2

Experiencing a similar issue here, friend. Currently using Windows 11 and bun version 1.1.4;

I can execute bun without any problems, except when trying to run a script from package.json. It functions properly otherwise. Manually running the scripts with bun or npm run works fine too. However, the moment I enter "bun dev", it throws the following error:

Here's the command I'm inputting: bun dev

And the response I receive: $ cd sisref-v2-dashboard-client; bun dev error: Failed due to error: bunsh: No such file or directory:

Sharing my package.json below in hopes that someone might be able to assist:

{
  "dependencies": {
    "@emotion/react": "^11.11.4",
    "@emotion/styled": "^11.11.5",
    "@microsoft/eslint-formatter-sarif": "2.1.7",
    "@mui/base": "^5.0.0-beta.40",
    "@mui/material": "^5.15.15",
    "@types/jsonwebtoken": "^9.0.6",
    "eslint": "8.57.0",
    "jsonwebtoken": "^9.0.2",
    "next": "^14.2.1",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "slide-element": "^2.3.1",
    "typescript": "^5.0.0"
  },
  ...
}

Answer №3

It seems that this issue is specific to the most recent Windows update. You will be able to execute your project by utilizing npm run dev as a temporary solution.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Saving a collection of React.js components in JavaScript to a specific location or storage for future use

Important Note: I am unable to utilize the Node FS module as my knowledge about npm and fs is limited. In my current project, I am developing a simple game where users can interact by clicking a button to display an image of a 'duck' on screen. ...

Database query not appearing on node.js route

As a newcomer to javascript and nodejs, I have encountered an issue that I'm hoping to get some clarification on. I am currently working on a simple API and facing difficulties in understanding why a certain behavior is occurring in my code. app.get( ...

Using a PHP WordPress Loop, eliminate the comma following the final object in the Schema array

My Google Schema Markup for a "Product" includes a loop that displays "Reviews". Below is an excerpt of the code: "review": [ <?php $args = array( 'post_type' => 'my_reviews', & ...

What is the significance of lifting state in the tic-tac-toe tutorial?

The tutorial on the official react tic-tac-toe website introduces a history of moves in its second part. This is done by creating a new Game component and moving the state from the Board to Game. I find it puzzling why the state needs to be lifted from the ...

When attempting to choose App Router (yes) in Next.js 13 during the installation process using npx create-next-app@latest, it fails to function

After installing Next.js in my project, I was prompted to install the App Router (yes/no). I chose yes, and the installation proceeded without any errors. However, when I tried to run the command npm run dev, I encountered an error and my localhost:3000 di ...

The use of pattern fill in fabric.js is causing a decrease in rendering speed

I recently attempted to create a clip mask effect on a large image by using the picture as a pattern and setting it to the svg paths that support the desired shape. You can view the slow-loading jsfiddle example here: http://jsfiddle.net/minzojian/xwurbw ...

What is causing express.js not to authenticate properly?

I'm currently in the process of developing a server application using node.js, which is up and running on localhost:8080. As I attempt to make a login request, I've encountered an issue where one method works while the other fails. My suspicion i ...

Utilizing Selenium automation to navigate a website that features a custom jQuery plugin-checkbox functionality

Utilizing Selenium WebDriver along with JavaScript to automate the testing of a website that features a custom jquery plugin named "jcf" (JavaScript Custom Forms) for aesthetically pleasing forms. You can find more information about this plugin here. I am ...

Adjusting jQuery inputmask mask according to dropdown selection: A complete guide

I am utilizing jQuery inputmask to achieve a specific effect: Currently, I have set up a simple formatting for US & Canada phone numbers like this: $("#user_phone").inputmask("mask", { "mask": "(999) 999-9999" }); However, I want to dynamically chan ...

Controlling a first person shooter game using three.js

I'm a beginner in three.js and 3D design, aiming to create a simple first-person shooter game. While I've come across several examples, they seem too complex for me to grasp. I prefer to understand the code thoroughly before implementing it. My m ...

"Discover the method for retrieving all data attribute values from within each tab on a webpage

I have tabs with nested divs containing "data" attributes. I need to retrieve all data attributes for each tab individually. $('#myTab a').click(function(e) { e.preventDefault(); $(this).tab('show'); }); $(function() { $(&apos ...

Ways to create dynamic functionality with JavaScript

I need to iterate through the document.getElementById("b") checked in a loop. Is this achievable? How can I implement it? <img class="img-responsive pic" id="picture" src="images/step1.png"> <?php //get rows query ...

Angular's bidirectional binding feature seems to be malfunctioning when integrated with Firebase

I'm facing an issue with displaying a list of products from my firebase database. Despite updating the $scope.products array and seeing it reflected in the console log, the changes are not being reflected on the user interface. app.controller("produc ...

Convert YAML to an array of objects instead of using named objects in npm parsing

Currently, I am utilizing npm's YAML parser to convert YAML into an object. However, instead of getting an array, I am receiving a group of named objects. This issue arises from the absence of dashes preceding the objects. How can I transform this gr ...

What is the method for retrieving the entire HTML code of a document in JavaScript, encompassing dynamically added HTML, scripts, and CSS?

I've been scouring the internet trying to find the complete code for an HTML document in JavaScript, including dynamically injected HTML, scripts, and CSS, but I haven't been able to find any solutions. Is it even possible to achieve this? If so ...

Step-by-step guide to displaying the dropdown menu button content at the top of the page in main.html by using the frameset tag

The layout of my main.html involves displaying menu.htm and welcome.htm using frameset. One issue that arises is with the drop-down menu buttons "Admin..." and "Scheduler...". When hovering over these buttons, the dropdown content does not display properly ...

Navigating through the various iterations of jQuery

Unique Case Study I'm currently facing a dilemma involving the integration of jstree and jquery-ui datepicker. The scenario is this: I am attempting to utilize jquery-ui-datepicker on an input element that is dynamically inserted into the DOM after ...

What is the best way to include a JavaScript function in a dynamically generated div?

By clicking a button, I am able to dynamically generate a table row that contains a div element with the class "contents." $(document).on("click", ".vote", function() { // Removing selected row var rowLoc = this.parentNode.parentNode. ...

How to Make Client-Side Jquery Code Function in Karma Tests

I'm facing a challenging issue for which I can't seem to find a solution. In my React component, I am using jQuery to modify the classes of certain DOM nodes based on a click event. Here is a simplified version of the code: hide() { if ($(&ap ...

Receiving errors in React/TS/material-ui when attempting to use a variable as a value for a grid property. Messages include "No overload matches" and "Type 'number' is not assignable to type..."

tl;dr: When using a variable as the value of a grid xs property in JSX, material-ui throws a TS error. I'm working on implementing grids in material-ui with React/TypeScript. The goal is to make the width of a specific element dependent on the quant ...