Skip to content
New issue

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

EACCES: permission denied, mkdir '../../dist' #34711

Closed
1 task done
sincovschi opened this issue Feb 23, 2022 · 11 comments · Fixed by #34795
Closed
1 task done

EACCES: permission denied, mkdir '../../dist' #34711

sincovschi opened this issue Feb 23, 2022 · 11 comments · Fixed by #34795
Labels
bug Issue was opened via the bug report template. please add a complete reproduction The issue lacks information for further investigation

Comments

@sincovschi
Copy link
Contributor

Verify canary release

  • I verified that the issue exists in Next.js canary release

Provide environment information

$  npx --no-install next info
/bin/sh: 1: yarn: not found

    Operating System:
      Platform: linux
      Arch: x64
      Version: #1 SMP Wed Aug 25 23:20:18 UTC 2021
    Binaries:
      Node: 16.13.1
      npm: 8.5.1
      Yarn: N/A
      pnpm: 6.31.0
    Relevant packages:
      next: 12.1.0
      react: 17.0.2
      react-dom: 17.0.2

What browser are you using? (if relevant)

Chrome

How are you deploying your application? (if relevant)

nx.dev

Describe the Bug

when run command npx nx run blog:serve I get the next error:

> Executing task: npx nx serve blog <


> nx run blog:serve

EACCES: permission denied, mkdir '../../dist'

 ———————————————————————

 >  NX   Running target "blog:serve" failed

   Failed tasks:
   
   - blog:serve
   
   Hint: run the command with --verbose for more details.

The terminal process "/usr/bin/bash '-c', 'npx nx serve blog'" terminated with exit code: 1.

Expected Behavior

when run command npx nx run blog:serve to not have any error as it does with next: 12.0.7.

To Reproduce

git clone https://github.com/sincovschi/sincovschi-website.git
cd sincovschi-website
npm install
npm install next@latest
npx nx run blog:serve
@sincovschi sincovschi added the bug Issue was opened via the bug report template. label Feb 23, 2022
@jedrzejginter
Copy link

I am also using Next 12.1.0 with NX and can confirm this issue when running the nx serve command. In version 12.0.10 this does not happen.
(I am able to run nx build command successfully though).

@balazsorban44
Copy link
Member

Hint: run the command with --verbose for more details.

What did it say?

Anyway, I think is best opened at https://github.com/nrwl/nx as it seems to be an NX bug. If they can confirm this is something with Next.js, we are happy to look more into it.

@sincovschi
Copy link
Contributor Author

I've tried verbose, gives no more details.
Also, any kind of fixes that would elevate rights over folders and files - with no success.

@balazsorban44, why would you think that NX has a bug, when there absolutely no errors with the older versions of Next?

@balazsorban44
Copy link
Member

balazsorban44 commented Feb 24, 2022

why would you think that NX has a bug,

Because NX has relied on Next.js internals before and we don't have a semver guarantee for that. It's possible that this is the case here as well.

Although, I checked your reproduction and followed the given steps, and I am not able to reproduce the issue.

image

We'll need a more reliable reproduction to investigate further.

@balazsorban44 balazsorban44 added the please add a complete reproduction The issue lacks information for further investigation label Feb 24, 2022
@sincovschi
Copy link
Contributor Author

Nope, the steps are the same.

image

Maybe on your side npm version is cached or something similar.

I've even tried another WSL container with the same result.

@balazsorban44
Copy link
Member

balazsorban44 commented Feb 24, 2022

I've purged my npm cache and reinstalled everything, and still could not reproduce. Regardless, I'll try to verify if there have been any related changes in Next.js after 12.0.7 regarding this. 👍

Could you pinpoint which of the canary releases between 12.0.8-canary.0 and v12.0.8-canary.22 made things break for you?

@sincovschi
Copy link
Contributor Author

sincovschi commented Feb 24, 2022

It's working with the version up till 12.0.10.

Found the canary version npm i next@v12.0.11-canary.16 --legacy-peer-deps:
image

@sincovschi
Copy link
Contributor Author

I've pinpointed the exact piece of code with the Issue, I'll open PR soon.

@sincovschi
Copy link
Contributor Author

#34795 - the fix has been merged. Waiting for next@12.1.1

@balazsorban44
Copy link
Member

Nice investigation! 👏 Happy to see it is fixed now 👍

@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. please add a complete reproduction The issue lacks information for further investigation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants