rescript-compiler icon indicating copy to clipboard operation
rescript-compiler copied to clipboard

FAILED: src/Main.ast CreateProcess failed: The system cannot find the file specified.

Open thelissimus opened this issue 1 year ago • 3 comments

Thank you for filing! Check list:

  • [x] Is it a bug? Usage questions should often be asked in the forum instead.
  • [x] Concise, focused, friendly issue title & description.

Cannot compile the code. Compiler fails with the following error:

$ npx rescript
Dependency Finished
rescript: [1/3] src/Main.ast
FAILED: src/Main.ast
CreateProcess failed: The system cannot find the file specified.
FAILED: cannot make progress due to previous errors.

Cannot run in watch mode. Compiler fails with the same error.

Tried these options already with ReScript 11.0.0-rc.3 and 10.1.4 versions on Windows 10, Windows 11 and NixOS Unstable (at the time of writing 23.11) on the x86_64 platform:

  • Deleting node_modules/ and package-lock.json all-together and re-installing dependencies.
  • Deleting the project and re-creating it again.
  • Creating the project on my NixOS machine (where the compiler works perfectly) and sending it to Windows 11.

The error occurs only on Windows 11 for unknown reasons and I don't even have the src/Main.ast file at all.

I'm not sure if I can capture the exact state of that machine and send it to you, so the only option is to try it out on any Windows 11. Here are relevant project/config files:

package.json:

{
	"name": "basics",
	"type": "module",
	"scripts": {
		"res:build": "rescript",
		"res:dev": "rescript build -w"
	},
	"dependencies": {
		"rescript": "^11.0.0-rc.3"
	}
}

bsconfig.json:

{
	"name": "basics",
	"sources": [
		{
			"dir": "src"
		}
	],
	"package-specs": [
		{
			"module": "es6",
			"in-source": true
		}
	],
	"suffix": ".bs.mjs",
	"bs-dependencies": []
}

src/Main.res:

Js.log("hello, world")
  • [x] OS and browser versions, if relevant.

OS: Windows 11 x86_64.

thelissimus avatar Oct 09 '23 15:10 thelissimus

The error when the project is created with npx create-rescript-app with @rescript/core included:

$ npm run res:dev

> [email protected] res:dev
> rescript build -w

Dependency on @rescript/core
rescript: [1/202] src/Core__Map.ast
FAILED: src/Core__Map.ast
CreateProcess failed: The system cannot find the file specified.
rescript: [2/202] src/Core__Map.iast
FAILED: src/Core__Map.iast
CreateProcess failed: The system cannot find the file specified.
rescript: [3/202] src/Core__Int.iast
FAILED: src/Core__Int.iast
CreateProcess failed: The system cannot find the file specified.
rescript: [4/202] src/Core__Int.ast
FAILED: src/Core__Int.ast
CreateProcess failed: The system cannot find the file specified.
rescript: [5/202] src/Core__Dict.ast
FAILED: src/Core__Dict.ast
CreateProcess failed: The system cannot find the file specified.
rescript: [6/202] src/Core__Intl.ast
FAILED: src/Core__Intl.ast
CreateProcess failed: The system cannot find the file specified.
rescript: [7/202] src/Core__Dict.iast
FAILED: src/Core__Dict.iast
CreateProcess failed: The system cannot find the file specified.
rescript: [8/202] src/Core__Date.iast
FAILED: src/Core__Date.iast
CreateProcess failed: The system cannot find the file specified.
rescript: [9/202] src/Core__Date.ast
FAILED: src/Core__Date.ast
CreateProcess failed: The system cannot find the file specified.
rescript: [10/202] src/Core__Set.ast
FAILED: src/Core__Set.ast
CreateProcess failed: The system cannot find the file specified.
rescript: [11/202] src/Core__Set.iast
FAILED: src/Core__Set.iast
CreateProcess failed: The system cannot find the file specified.
rescript: [12/202] src/Core__Type.ast
FAILED: src/Core__Type.ast
CreateProcess failed: The system cannot find the file specified.
rescript: [13/202] src/Core__Array.ast
FAILED: src/Core__Array.ast
CreateProcess failed: The system cannot find the file specified.
rescript: [14/202] src/Core__List.ast
FAILED: src/Core__List.ast
CreateProcess failed: The system cannot find the file specified.
rescript: [15/202] src/Core__Error.ast
FAILED: src/Core__Error.ast
CreateProcess failed: The system cannot find the file specified.
rescript: [16/202] src/Core__Null.iast
FAILED: src/Core__Null.iast
CreateProcess failed: The system cannot find the file specified.
rescript: [17/202] src/Core__Array.iast
FAILED: src/Core__Array.iast
CreateProcess failed: The system cannot find the file specified.
rescript: [18/202] src/Core__Type.iast
FAILED: src/Core__Type.iast
CreateProcess failed: The system cannot find the file specified.
rescript: [19/202] src/Core__List.iast
FAILED: src/Core__List.iast
CreateProcess failed: The system cannot find the file specified.
FAILED: subcommands failed.
Failure: C:\<OMITTED>\rescript-base\node_modules\rescript\win32\ninja.exe 
Location: C:\<OMITTED>\rescript-base\node_modules\@rescript\core\lib\bs

[!NOTE] Omitted unnecessary parts of path (<OMITTED>).

thelissimus avatar Oct 10 '23 09:10 thelissimus