NPM이 멈춰서 동일한 오류가 발생합니다. EISDIR : 디렉터리에 대한 잘못된 작업, 오류시 읽기 (기본)
내가 어떤 디렉토리에 있는지, cmd.exe에서 "npm"뒤에 무엇을 입력하든이 오류가 발생합니다. 다음은 npm-debug.log입니다.
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js' ]
2 info using npm@2.14.12
3 info using node@v4.2.6
4 verbose stack Error: EISDIR: illegal operation on a directory, read
4 verbose stack at Error (native)
5 verbose cwd C:\Users\me
6 error Windows_NT 6.1.7601
7 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js"
8 error node v4.2.6
9 error npm v2.14.12
10 error code EISDIR
11 error errno -4068
12 error syscall read
13 error eisdir EISDIR: illegal operation on a directory, read
13 error eisdir This is most likely not a problem with npm itself
13 error eisdir and is related to npm not being able to find a package.json in
13 error eisdir a package you are trying to install.
14 verbose exit [ -4068, true ]
nodejs를 여러 번 제거하고 다시 설치하려고 시도했으며 C : \ Users \ me \ AppData \ Roaming에서 npm 및 npm-cache 폴더도 삭제했습니다. 이 문제의 원인이 무엇인지 잘 모르겠습니다. 잠시만 잘 작동했고 이제이 오류를 제거 할 수 없습니다. 로그의 설명은 모든 디렉토리에서이 오류를 제공하므로 의미가 없습니다. 관리자 권한으로 명령 프롬프트를 실행해도이 오류가 발생하지 않습니다. 이 문제를 해결하기 위해 이번 금요일 저녁에 머리카락을 뽑아 내고 있습니다. 어떤 도움을 주시면 대단히 감사하겠습니다!
일부 npm 설정을 변경하는 동안 동일한 문제가 발생했습니다. 나는 하나의 npm config set명령 으로 실수를 했고 이것은 존재하지 않는 디렉토리를 참조하는 줄을 C:\Users\{User}\.npmrc. 에서 해당 줄을 수동으로 삭제 한 후 .npmrc문제가 사라졌습니다.
EISDIR 는 " Error, Is Directory "를 의미합니다. 이것은 NPM이 파일에 대해 무언가를 시도하고 있지만 그것이 디렉토리 라는 것을 의미합니다 . 귀하의 경우 NPM은 디렉토리 인 파일 을 " 읽으 려고 "합니다 (행 : 4). 작업을 수행 할 수 없기 때문에 오류가 발생합니다.
여기서 확인해야 할 세 가지.
- 파일이 있는지 확인하십시오. 그렇지 않은 경우 생성해야합니다. (NPM이 파일의 특정 정보에 의존하는 경우 해당 정보가 있어야합니다.)
- 실제로 디렉토리가 아닌 파일인지 확인하십시오.
- 올바른 권한이 있습니다. "sudo chmod 777 FILE_NAME"을 사용하여 모든 권한을 갖도록 파일을 변경할 수 있습니다. (주의 : 해당 파일의 모든 사용자에게 읽기, 쓰기 및 실행 권한을 부여합니다.)
npm을 버전 6.4.1에서 버전 6.5.0으로 업그레이드 한 후에도 오늘 같은 문제가 발생했습니다. node.js 에서 .pkg 설치 프로그램 (대부분의 사용자에게 권장 됨)을 다운로드하여이 문제를 해결 하고 나중에 실행했습니다.
제 경우에는 "EISDIR : 디렉토리에 대한 잘못된 작업, 읽기"가 발생했습니다. .angular-cli.json 파일에서 "스크립트"에 전체 경로를 제공하지 않았기 때문입니다.
예를 들어
"scripts": [
"../node_modules/hammerjs",
"../node_modules/moment"
],
사실 그것은
"scripts": [
"../node_modules/hammerjs/hammer.min.js",
"../node_modules/moment/min/moment.min.js"
],
Mac OS X (homebrew와 함께 설치됨)에서 동일한 문제가 발생했으며 .npmrc가 구성 변수를 저장하는 유일한 장소 노드는 아닙니다. / usr / local / etc에 다음 명령을 사용하여 편집해야하는 glocal npmrc 구성 파일이 있습니다.
sudo nano npmrc
ca=설치를 중단 시킨 줄 또는 구성 설정이 무엇이든 제거하고 해당 파일을 저장 한 다음 npm을 다시 시도하면 작동하는 것을 볼 수 있습니다.
이러한 이상한 오류는 최근 내 OSX 컴퓨터에서 발생했습니다.
다음을 실행하여 빠르고 더러운 방법으로 나 자신을 도울 수 있습니다.
sudo chmod -R 777 /usr/local/lib/node_modules/
모든 글로벌 노드 모듈의 액세스 권한을 엉망으로 만든 것 같습니다.
경로 제거 등을 포함하여 전체 제거를 수행하고 다시 설치하면 문제가 해결되었지만 매우 이상한 문제입니다.
Windows에서 node.js를 완전히 제거하는 방법
적절한 디렉토리에서 npm install을 실행하고 있는지 확인하십시오.
(예를 들어 package.json 파일은 하나의 추가 디렉토리가 될 수 있습니다.)
문제가 React Native packager와 관련된 경우. 로 캐시를 재설정 해보십시오 react-native start --reset-cache.
제 경우에는 요청한 파일 중 하나의 전체 경로 를 전달하는 것을 잊었습니다 . 파일의 전체 경로를 전달한 후 :)
나는 꿀꺽 꿀꺽 마시면서이 문제가있었습니다. 문제는 gulp가 내 소스 파일에 종속성을 추가했고 npm이 그것을 열려고했다고 생각한다는 것입니다.
{
"name": "name",
"version": "2.0.0",
"description": "",
"main": "gulpfile.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"appname": "file://gulp",
"gulp-concat": "^2.6.1",
"gulp-electron": "^0.1.3",
"gulp-shell": "^0.5.2",
"gulp-uglify": "^2.0.0",
"gulp-util": "^3.0.7",
"node-7z": "^0.4.0"
}
}
package.json 파일에 이상한 참조가 없는지 확인하십시오.
I had a similar problem while setting up boilerplate code. It was reading my bundle.js file as a directory. So as stated here. EISDIR mean its a directory and not a file. To fix the issue, I deleted the file and just recreated (it was originally created automatically). If you cannot find the file (because its hidden), simply use the terminal to find and delete it.
Had the same problem until I tried deleting the .git folder. It worked. I guess this type of problem can have different causes.
I had the same issue. There was a linked folder in my directory which was causing the issue. i added that folder to ignore list and then it started working fine as expected.
I know this isn't specifically asking about forever js.. but google lead me here so.. For me it was as simple as an ending slash.
I just changed:
forever start -a -l /dev/null/ /var/www/node/my_file.js
To:
forever start -a -l /dev/null /var/www/node/my_file.js
And the error disappeared
For me fixing was add slash after directory name
Make sure to check your version of npm and whether or not there are issues with it. I was having the same issue at the time of this post and I discovered that my npm version (6.5) was having issues. I had to uninstall and reinstall npm version 6.4.1 and then everything started to work great again.
I had a broken symlink to node_modules in a subfolder
In my case, i was facing this issue while installing create-react-app in MAC (Mojave OS) with following command :
sudo npm install create-react-app -g
and got errors like this :
npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/rxjs-a84420a7/src/scheduler'
npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/rxjs-a84420a7/src/symbol'
npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/rxjs-a84420a7/src/testing'
npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/rxjs-a84420a7/src/util'
npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/rxjs-a84420a7/src/webSocket'
npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/rxjs-a84420a7/symbol'
npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/rxjs-a84420a7/testing'
npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/rxjs-a84420a7/util'
npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/rxjs-a84420a7/webSocket'
I have read npm.community that try to install without sudo :
npm install create-react-app -g
and it actually solved my issue ..!!
In my case these steps solved my problem:
- terminating
npmprocess(CTRL + C) - deleting entire folder
- creating new one
- running
npmagain
Make sure node_modules (and your root package.json) doesn't contain a reference to npm's "package.json" module. Deleting package.json FOLDER from node_modules solved the issue for me.
'Program Club' 카테고리의 다른 글
| Dalvik 형식으로 변환 실패 : dex를 실행할 수 없음 : Java 힙 공간 (0) | 2020.10.08 |
|---|---|
| JavaScript를 통해 쿼리 문자열 값이 있는지 확인하는 방법은 무엇입니까? (0) | 2020.10.08 |
| .NET에서 생성 날짜별로 파일 가져 오기 (0) | 2020.10.08 |
| UITableViewController에서 UISearchDisplayController를 사용할 때 어설 션 실패 (0) | 2020.10.08 |
| java.lang.ClassNotFoundException : Eclipse의 com.mysql.jdbc.Driver (0) | 2020.10.08 |