-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
Description
I get this error when I try to run the script for any template on a Windows environment.
trivin server -g -i
? Please choose which project template to use node-passport-jwt
ERROR Invalid template name
The error is caused by the the invalid path for templateDir in main.js line 55.
_const currentFileURL = import.meta.url;
import.meta.url gives the string 'file:///C:/...".
const templateDir = path.resolve(
new URL(currentFileURL).pathname,
'../../templates',
options.template.toLowerCase()
)
path.resolve() gives the string 'C:\C:...' causing the error. I had to remove the duplicate 'C:' to get the script to work.
calvinqc