Closed 1034935767 closed 1 week ago
I can run it, but I cannot build it
Duplicate of #12
I just want to mention that this added line does fix the issue, which I also encounter with a fresh install of Nuxt on Windows.
I just want to mention that this added line does fix the issue, which I also encounter with a fresh install of Nuxt on Windows.
What specific line of code is it? My English is not good.
I temporary fixed it by adding shell: true
to node_modules\@prisma\nuxt\dist\module.mjs
:
async function installStudio(directory) {
try {
const { spawn } = require("child_process");
log(PREDEFINED_LOG_MESSAGES.installStudio.action);
await spawn("npx", ["prisma", "studio", "--browser", "none"], {
cwd: directory,
shell: true // when use windows, this should be add
});
logSuccess(PREDEFINED_LOG_MESSAGES.installStudio.success);
return true;
} catch (err) {
logError(PREDEFINED_LOG_MESSAGES.installStudio.error);
log(err);
return false;
}
}
I hope an OS check gets added, to add this line is someone uses Windows.
Thanks to @1034935767
I temporary fixed it by adding
shell: true
tonode_modules\@prisma\nuxt\dist\module.mjs
:async function installStudio(directory) { try { const { spawn } = require("child_process"); log(PREDEFINED_LOG_MESSAGES.installStudio.action); await spawn("npx", ["prisma", "studio", "--browser", "none"], { cwd: directory, shell: true // when use windows, this should be add }); logSuccess(PREDEFINED_LOG_MESSAGES.installStudio.success); return true; } catch (err) { logError(PREDEFINED_LOG_MESSAGES.installStudio.error); log(err); return false; } }
I hope an OS check gets added, to add this line is someone uses Windows.
Thanks to @1034935767
Where is this added to? I am different from you. I made an error using the drone CI CD, and I did not make any mistakes while developing on Windows.
I got this error. I use windows,.