Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

105
Views
npm init no creará el archivo package.json

El directorio de prueba está vacío y ejecutar npm init no crea un archivo package.json.

El error a continuación dice que no existe tal directorio, lo cual es confuso ya que estoy en dicho directorio cuando ejecuto el comando npm init.

 PS C:\Users\Sayee\OneDrive\Documents\test> npm init Press ^C at any time to quit. package name: (test) version: (1.0.0) description: entry point: (index.js) test command: git repository: keywords: author: license: (ISC) About to write to C:\Users\Sayee\OneDrive\Documents\test\package.json: { "name": "test", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC" } Is this OK? (yes) npm ERR! code ENOENT npm ERR! syscall open npm ERR! path C:\Users\Sayee\OneDrive\Documents\test\package.json npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\Sayee\OneDrive\Documents\test\package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Sayee\AppData\Local\npm-cache\_logs\2021-09-01T19_50_44_400Z-debug.log

Versiones:

  • nodo v15.5.1

  • npm v7.4.2

editar:

error diferente si creo manualmente un archivo package.json vacío en el directorio. El archivo Package.json no está abierto en ninguna parte y he intentado ejecutar la terminal como administrador.

 npm ERR! code EPERM npm ERR! syscall write npm ERR! errno -4048 npm ERR! Error: EPERM: operation not permitted, write npm ERR! [Error: EPERM: operation not permitted, write] { npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'write' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It's possible that the file was already in use (by a text editor or antivirus), npm ERR! or that you lack permissions to access it. npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Sayee\AppData\Local\npm-cache\_logs\2021-09-01T23_57_39_015Z-debug.log
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Creo que el problema no tiene nada que ver con npm/node, y podría deberse a la propiedad/permiso especial del sistema de archivos de C:\Users\Sayee\OneDrive\Documents\ .

about 4 years ago · Juan Pablo Isaza Report

0

Deshabilitar el acceso controlado a la carpeta en Windows bajo Protección contra ransomeware solucionó el problema.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!