umi-example-electron icon indicating copy to clipboard operation
umi-example-electron copied to clipboard

Windows 7 Error: ENAMETOOLONG: name too long

Open c2rlost2r opened this issue 6 years ago • 3 comments

Windows 7 Error: ENAMETOOLONG: name too long

I have windows 7 with node 9.6.1

1st I fix issue https://github.com/umijs/umi-example-electron/issues/1 Then I install like explain in the tutorial.

Then I install cross-env https://github.com/kentcdodds/cross-env to run on windows. In package.json change:

dev:main": "cross-env ESLINT=none BROWSER=none COMPRESS=none roadhog build -w", "dev:renderer": "cross-env APP_ROOT=src/renderer BROWSER=none ESLINT=none umi dev",

Then in terminal:

npm run dev

It works ok for about a minute then show this error in the terminal:

Error: ENAMETOOLONG: name too long, stat 'C:\code\react\umi-dva\umi-example-electron\src\renderer\src\renderer\src\renderer\src\renderer\src\renderer\src\renderer\src\renderer\src\renderer\src\renderer\src\renderer\src\renderer\src\renderer\src\renderer\src\renderer\src\renderer\src\renderer\src\renderer\src\renderer\src

I cut the error because is too long. The error repeat: src\renderer\ many times. C:\code\react\umi-dva\umi-example-electron\ is the folder where I installed it.

I think the error could be of umi, in APP_ROOT=src/renderer

If in other termininal I do:

npm run start

It works ok, show the electron browser: error-001

But, of course when start the error(ENAMETOOLONG), the browser show: error disconect

I have a Mac and I run the example and works ok.

Thanks in advance.

c2rlost2r avatar Jul 03 '18 01:07 c2rlost2r

can solve this bug? @sorrycc

alwaysloseall avatar Aug 14 '18 02:08 alwaysloseall

@alwaysloseall No, I still have the bug. I upgrade to umi 1.3.18 and I still have the bug. do you have the same bug? I tried to solve this way: https://github.com/umijs/umi-example-electron/issues/4 But I could not move the folders.

c2rlost2r avatar Aug 16 '18 23:08 c2rlost2r

I have same problem. My environment: win 10 node v8.9.0

YeomanYe avatar Oct 28 '18 03:10 YeomanYe