Open giuseppe-coco opened 7 months ago
Hello @giuseppe-coco,
I'm trying to reproduce your issue on the Windows machine but without any luck... Not sure might cause your issue but when looking into the code I see that there might be one line missing in packages/internal/cli/scripts/lib/runCommand.js
.
Could you modify this file (after the init script will copy the SB repository into your location) and add the following line:
shell: process.platform === 'win32',
after
stdio: 'inherit',
so the code will look like:
const cmd = spawn(command, args, {
stdio: 'inherit',
shell: process.platform === 'win32',
...options,
});
Then, please run pnpm i
and we'll see if the packages will build correctly
Hello @giuseppe-coco, I'm trying to reproduce your issue on the Windows machine but without any luck... Not sure might cause your issue but when looking into the code I see that there might be one line missing in
packages/internal/cli/scripts/lib/runCommand.js
. Could you modify this file (after the init script will copy the SB repository into your location) and add the following line:shell: process.platform === 'win32',
after
stdio: 'inherit',
so the code will look like:
const cmd = spawn(command, args, { stdio: 'inherit', shell: process.platform === 'win32', ...options, });
Then, please run
pnpm i
and we'll see if the packages will build correctly
I had the same issue; this resolved it for me. I'm not sure how the line was missing for me since I've used the 'starter kit' setup.
Hello @giuseppe-coco, I'm trying to reproduce your issue on the Windows machine but without any luck... Not sure might cause your issue but when looking into the code I see that there might be one line missing in
packages/internal/cli/scripts/lib/runCommand.js
. Could you modify this file (after the init script will copy the SB repository into your location) and add the following line:shell: process.platform === 'win32',
after
stdio: 'inherit',
so the code will look like:
const cmd = spawn(command, args, { stdio: 'inherit', shell: process.platform === 'win32', ...options, });
Then, please run
pnpm i
and we'll see if the packages will build correctly
I modified the code as you wrote, but when I run pnpm i
get an error :
pnpm i
packages/webapp | WARN The field "pnpm" was found in C:\Users\ccpep\Desktop\projects\saas-boilerplate\packages\webapp/package.json. This will not take effect. You should configure "pnpm" at the root of the workspace instead.
Scope: all 23 workspace projects
Lockfile is up to date, resolution step is skipped
Already up to date
. postinstall$ node packages/internal/cli/scripts/build.js
│ node:events:496
│ throw er; // Unhandled 'error' event
│ ^
│ Error: spawn pnpm ENOENT
│ at ChildProcess._handle.onexit (node:internal/child_process:286:19)
│ at onErrorNT (node:internal/child_process:484:16)
│ at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
│ Emitted 'error' event on ChildProcess instance at:
│ at ChildProcess._handle.onexit (node:internal/child_process:292:12)
│ at onErrorNT (node:internal/child_process:484:16)
│ at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
│ errno: -4058,
│ code: 'ENOENT',
│ syscall: 'spawn pnpm',
│ path: 'pnpm',
│ spawnargs: [ 'run', 'build' ]
│ }
│ Node.js v20.11.0
└─ Failed in 72ms at C:\Users\ccpep\Desktop\projects\saas-boilerplate
ELIFECYCLE Command failed with exit code 1.
Describe the bug
postinstall$ node packages/internal/cli/scripts/build.js │ node:events:492 │ throw er; // Unhandled 'error' event │ ^ │ Error: spawn pnpm ENOENT │ at ChildProcess._handle.onexit (node:internal/child_process:286:19) │ at onErrorNT (node:internal/child_process:484:16) │ at process.processTicksAndRejections (node:internal/process/task_queues:82:21) │ Emitted 'error' event on ChildProcess instance at: │ at ChildProcess._handle.onexit (node:internal/child_process:292:12) │ at onErrorNT (node:internal/child_process:484:16) │ at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { │ code: 'ENOENT', │ syscall: 'spawn pnpm', │ path: 'pnpm', │ spawnargs: [ 'run', 'build' ] │ } │ Node.js v20.9.0 └─ Failed in 179ms at C:\Users\ccpep\Desktop\saas-boilerplate Installing dependencies... ! Error: Command failed: pnpm i --frozen-lockfile npm ERR! code 1 npm ERR! path C:\Users\ccpep\Desktop\saas-boilerplate npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c create-saas-boilerplate
npm ERR! A complete log of this run can be found in: C:\Users\ccpep\AppData\Local\npm-cache_logs\2023-11-12T16_27_29_802Z-debug-0.log
Steps to reproduce
System Info
Logs
No response
Validations