Skip to content

fix(@intlayer/chokidar): update shell property in spawn options to be based on isWin#344

Merged
aymericzip merged 1 commit intoaymericzip:mainfrom
ebsaral:dev-command-on-win32
Dec 14, 2025
Merged

fix(@intlayer/chokidar): update shell property in spawn options to be based on isWin#344
aymericzip merged 1 commit intoaymericzip:mainfrom
ebsaral:dev-command-on-win32

Conversation

@ebsaral
Copy link
Copy Markdown
Contributor

@ebsaral ebsaral commented Dec 14, 2025

Description

I updated dev command in package.json to intlayer watch --with 'next dev', following the steps in intlayer's next.js configuration guide displayed under Watch dictionaries changes on Turbopack section.

Running yarn dev on a Windows OS shell, I get this error

$ intlayer watch --with 'next dev'
[intlayer]  Watching Intlayer content declarations
[runParallel] Failed to start: spawn 'next ENOENT

After doing some research, I have found this Stack Overflow answer:

const myChildProc = spawn('my-command', ['my', 'args'], {shell: process.platform == 'win32'})

Solution

I've updated spawnOptions in runParallel to consider isWin boolean in its options.

Explanation

I am not sure if it will fix the problem but I think it makes sense.


System info

OS Name:                   Microsoft Windows 10 Home
OS Version:                10.0.19045 N/A Build 19045
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
System Manufacturer:       TOSHIBA
System Model:              SATELLITE L755
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: Intel64 Family 6 Model 42 Stepping 7 GenuineIntel ~2301 Mhz
BIOS Version:              INSYDE 1.90, 17.05.2011
Windows Directory:         C:\WINDOWS
System Directory:          C:\WINDOWS\system32

@aymericzip
Copy link
Copy Markdown
Owner

I will test, good job @ebsaral

@ebsaral ebsaral force-pushed the dev-command-on-win32 branch from 004e598 to 18836e2 Compare December 14, 2025 12:01
@ebsaral ebsaral changed the title Windows runParallel error fix: Update shell property in spawn options to be based on isWin fix(chokidar): update shell property in spawn options to be based on isWin Dec 14, 2025
@ebsaral ebsaral force-pushed the dev-command-on-win32 branch from 18836e2 to 6074439 Compare December 14, 2025 12:19
@ebsaral ebsaral changed the title fix(chokidar): update shell property in spawn options to be based on isWin fix(@intlayer/chokidar): update shell property in spawn options to be based on isWin Dec 14, 2025
Copy link
Copy Markdown
Owner

@aymericzip aymericzip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good to me

@ebsaral
Copy link
Copy Markdown
Contributor Author

ebsaral commented Dec 14, 2025

good to me

Build test is failing.
I am not sure where it needs an update.
Any idea? @aymericzip

@aymericzip
Copy link
Copy Markdown
Owner

It's fine, the issue is not related to your change, merging

@aymericzip aymericzip merged commit df9c8c3 into aymericzip:main Dec 14, 2025
1 check failed
@ebsaral ebsaral deleted the dev-command-on-win32 branch December 14, 2025 12:36
@aymericzip
Copy link
Copy Markdown
Owner

hey @ebsaral

you can try the v7.5.0-canary.1

@ebsaral
Copy link
Copy Markdown
Contributor Author

ebsaral commented Dec 17, 2025

hey @aymericzip

I had to change the command to:
intlayer watch --with next dev because it gave this error:

''next' is not recognized as an internal or external command,
operable program or batch file.

Then it worked as expected at my first try. 👍

Later, I've tried it again to be sure but got this error:

○ Compiling /[locale] ...
 GET /en 200 in 32.6s (compile: 29.3s, proxy.ts: 1068ms, render: 2.3s)
[intlayer]  Change detected: C:\Projects\Logical-Spirituality\website\contents\IntroSection.content.ts
[intlayer]  Change detected: C:\Projects\Logical-Spirituality\website\contents\IntroSection.content.ts
Error: The service is no longer running -  "Error: The service is no longer running\n    at C:\\Projects\\Logical-Spirituality\\website\\node_modules\\@intlayer\\cli\\node_modules\\esbuild\\lib\\main.js:969:34\n    at sendRequest (C:\\Projects\\Logical-Spirituality\\website\\node_modules\\@intlayer\\cli\\node_modules\\esbuild\\lib\\main.js:619:36)\n    at buildOrContextContinue (C:\\Projects\\Logical-Spirituality\\website\\node_modules\\@intlayer\\cli\\node_modules\\esbuild\\lib\\main.js:968:5)\n    at buildOrContextImpl (C:\\Projects\\Logical-Spirituality\\website\\node_modules\\@intlayer\\cli\\node_modules\\esbuild\\lib\\main.js:898:5)\n    at Object.buildOrContext (C:\\Projects\\Logical-Spirituality\\website\\node_modules\\@intlayer\\cli\\node_modules\\esbuild\\lib\\main.js:700:5)\n    at C:\\Projects\\Logical-Spirituality\\website\\node_modules\\@intlayer\\cli\\node_modules\\esbuild\\lib\\main.js:2035:15\n    at new Promise (<anonymous>)\n    at Object.build (C:\\Projects\\Logical-Spirituality\\website\\node_modules\\@intlayer\\cli\\node_modules\\esbuild\\lib\\main.js:2034:25)\n    at build (C:\\Projects\\Logical-Spirituality\\website\\node_modules\\@intlayer\\cli\\node_modules\\esbuild\\lib\\main.js:1885:51)\n    at Object.transpileTSToMJS (C:\\Projects\\Logical-Spirituality\\website\\node_modules\\@intlayer\\cli\\node_modules\\@intlayer\\config\\dist\\cjs\\loadExternalFile\\transpileTSToMJS.cjs:43:34)"
[intlayer]  Remote dictionary has no key
[intlayer]  {
  "filePath": "contents\\IntroSection.content.ts"
}
[intlayer]  TypeScript types built
[intlayer]  Module augmentation built
[intlayer]  TypeScript types built
[intlayer]  Dictionary list built
[intlayer]  Module augmentation built
 GET /en 200 in 1764ms (compile: 1021ms, proxy.ts: 52ms, render: 691ms)
 ✓ Compiled in 1796ms
 ⨯ ./node_modules/next-intlayer/node_modules/@intlayer/core/dist/esm/interpreter/getIntlayer.mjs:4:1
Export getDictionaries doesn't exist in target module
  2 | import { getAppLogger } from "@intlayer/config/client";
  3 | import configuration from "@intlayer/config/built";
> 4 | import { getDictionaries } from "@intlayer/dictionaries-entry";
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  5 |
  6 | //#region src/interpreter/getIntlayer.ts
  7 | const getIntlayer = (key, locale, plugins) => {

The export getDictionaries was not found in module [project]/.intlayer/main/dictionaries.mjs [app-client] (ecmascript).
The module has no exports at all.
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.

Import traces:
  Client Component Browser:
    ./node_modules/next-intlayer/node_modules/@intlayer/core/dist/esm/interpreter/getIntlayer.mjs [Client Component Browser]
    ./node_modules/next-intlayer/node_modules/react-intlayer/dist/esm/getIntlayer.mjs [Client Component Browser]
    ./node_modules/next-intlayer/node_modules/react-intlayer/dist/esm/client/useIntlayer.mjs [Client Component Browser]
    ./src/app/components/ProjectSection.jsx [Client Component Browser]
    ./src/app/components/ProjectSection.jsx [Server Component]
    ./src/app/[locale]/page.tsx [Server Component]

  Client Component SSR:
    ./node_modules/next-intlayer/node_modules/@intlayer/core/dist/esm/interpreter/getIntlayer.mjs [Client Component SSR]
    ./node_modules/next-intlayer/node_modules/react-intlayer/dist/esm/getIntlayer.mjs [Client Component SSR]
    ./node_modules/next-intlayer/node_modules/react-intlayer/dist/esm/client/useIntlayer.mjs [Client Component SSR]
    ./src/app/components/ProjectSection.jsx [Client Component SSR]
    ./src/app/components/ProjectSection.jsx [Server Component]
    ./src/app/[locale]/page.tsx [Server Component]

Maybe it's just a local issue. I just wanted to share the output in case you may see an error to fix.

@aymericzip
Copy link
Copy Markdown
Owner

I cant reproduce @ebsaral,

I tested on Next 16.0.10 / intlayer 7.3.2-canary.1 on my mac, and I dont have any issue when I start the dev server or build

but I wander is it's not related to that comment
#318 (comment)

If you close the terminal and open a new one, does it fix the issue?

I had to change the command to:
intlayer watch --with next dev because it gave this error:

What command did you use before ? intlayer watch --with 'next dev'?

@aymericzip
Copy link
Copy Markdown
Owner

hey @ebsaral

i was able to reproduce the The service is no longer running error

It's indeed related to the process that still run in background

I will try to provide a fix

but happy to get more details about

I had to change the command to:
intlayer watch --with next dev because it gave this error:

@ebsaral
Copy link
Copy Markdown
Contributor Author

ebsaral commented Dec 18, 2025

@aymericzip thank you for checking it out.

I removed the single quotes from the command to make it run on windows. It was giving the error I shared above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants