'missing ) after argument list' when building custom node

Hi! I’m trying to build a custom node using n8n-node-dev on Windows 10, but I’m getting the below error. Looks like it’s trying to run the shell script for tsc in nodejs? Any ideas?

>n8n-node-dev build

Build credentials and nodes
=========================
The nodes got build and saved into the following folder:
C:\Users\user\.n8n\custom
C:\Users\user\AppData\Roaming\npm\node_modules\n8n-node-dev\node_modules\.bin\tsc:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
        ^^^^^^^

SyntaxError: missing ) after argument list
    at wrapSafe (internal/modules/cjs/loader.js:1054:16)
    at Module._compile (internal/modules/cjs/loader.js:1102:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47

Hey @vonstrenginho ,
The command that is executed to assign the variable basedir appears to be a bash script. Is it possible that the issue is arising from you working in a Windows build environment?

1 Like

Yes, is Windows not supported for this?

Frankly, I’m not certain. I do most of my development writing on Windows but I run all my test code on Linux. I also know that the n8n team is relatively Mac focused.

@jan, could you provide some insight into this?

@vonstrenginho Workaround here: CLI tool build command fails to find Typescript on Windows · Issue #665 · n8n-io/n8n · GitHub

3 Likes

Thanks, that worked a charm!