nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨
https://nodejs.org
Other
107.69k stars 29.64k forks source link

Error: EPERM: operation not permitted #35919

Open PoojaDurgad opened 4 years ago

PoojaDurgad commented 4 years ago

What steps will reproduce the bug?

./vcbuild.bat test

What is the expected behavior?

run the test without fail

What do you see instead?

Path: es-module/test-esm-symlink-type
node:internal/fs/utils:306
    throw err;
    ^

Error: EPERM: operation not permitted, symlink 'C:\node\test\fixtures\es-modules\mjs-file.mjs' -> 'C:\node\test\.tmp.149\extensionless-symlink-to-mjs-file'
    at Object.symlinkSync (node:fs:1173:3)
    at C:\node\test\es-module\test-esm-symlink-type.js:48:6
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (C:\node\test\es-module\test-esm-symlink-type.js:46:10)
    at Module._compile (node:internal/modules/cjs/loader:1083:30)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1112:10)
    at Module.load (node:internal/modules/cjs/loader:948:32)
    at Function.Module._load (node:internal/modules/cjs/loader:789:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:72:12)
    at node:internal/main/run_main_module:17:47 {
  errno: -4048,
  syscall: 'symlink',
  code: 'EPERM',
  path: 'C:\\node\\test\\fixtures\\es-modules\\mjs-file.mjs',
  dest: 'C:\\node\\test\\.tmp.149\\extensionless-symlink-to-mjs-file'
}

Additional information

I am trying to run tests in windows, and get a bunch of failures with similar errors

PoojaDurgad commented 4 years ago

running git bash as administrator solves the issue, but not sure if this is the right approach

mmomtchev commented 4 years ago

@PoojaDurgad can you try deleting your whole source tree, then re-clone and rebuild?

jasnell commented 3 years ago

I think the challenge might be related to git bash itself here. Can you build without using git bash?

lemire commented 12 months ago

I get this same error. If we are expected to run the builds under bash, shouldn't this be documented?

lemire commented 12 months ago

The current instructions tell us to use vcbuild.bat, which is a Microsoft batch file. I don't think this will run under bash, will it?

huseyinacacak-janea commented 8 months ago

The node tests need to test creating links. As your user doesn't have permission to create symbolic links, you get an EPERM error. Please follow the instructions below to make sure you have the right to create symbolic links with your user.

  1. Find the configuration location stated here.
  2. Click on Add User or Group
  3. Click on Advanced
  4. Click on Find Now
  5. Search your user in the list and click on Ok
  6. After adding your user, you may need to reboot your computer.