We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
The text was updated successfully, but these errors were encountered:
Thanks a lot! I have added this Issue to Bug. And will create a PR for this one soon.
Sorry, something went wrong.
@JT-Dev-215 Currently I don't have a Windows to test on and was quite busy at the moment with other projects at work to write some Mocha.js test.
I have created a PR #5 here to fix this issue and would love your help/contribution to test out this fix.
Please replace this code in main.js:
main.js
const currentFileURL = dirname(fileURLToPath(import.meta.url)); const templateDir = path.resolve( currentFileURL, '../templates', options.template.toLowerCase() );
And run this in terminal:
$ npm link $ trivin server -g
calvinqc
Successfully merging a pull request may close this issue.
I get this error when I try to run the script for any template on a Windows environment.
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.
The text was updated successfully, but these errors were encountered: