반응형
ENOENT: node_modules\jquery\dist\jquery.min.js'에 해당하는 파일 또는 디렉토리가 없습니다.
저는 제가 무엇을 잘못하고 있는지 확신할 수 없습니다.
자습서를 따라가고 있지만 다음 오류가 계속 발생합니다.
ENOENT: 해당 파일이나 디렉토리가 없습니다. 'C:\Users\andrekp\Documents\VSCode\Projects\node_modules\jquery\dist\jquery.min.js' 오류: ENOENT: 해당 파일이나 디렉토리가 없습니다. 'C:\Users\andrekp\Documents\VSCode\Projects\node_modules\jquery\dist\jquery.min.js'
여기 제 angular.json 파일이 있습니다.
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"MyProjectName": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/MyProjectName",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css",
"../node_modules/bootstrap/dist/css/bootstrap.min.css"
],
"scripts": [
"../node_modules/jquery/dist/jquery.min.js",
"../node_modules/bootstrap/dist/js/bootstrap.min.js"
]
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "MyProjectName:build"
},
"configurations": {
"production": {
"browserTarget": "MyProjectName:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "MyProjectName:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.css",
"../node_modules/bootstrap/dist/css/bootstrap.min.css"
],
"scripts": [
"../node_modules/jquery/dist/jquery.min.js",
"../node_modules/bootstrap/dist/js/bootstrap.min.js"
],
"assets": [
"src/favicon.ico",
"src/assets"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"MyProjectName-e2e": {
"root": "e2e/",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "MyProjectName:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "MyProjectName"
}
내 오류를 자세히 검토한 후:
C:\Users\andrewkp\Documents\VSCode\Projects\node_modules\jquery\dist\jquery.min.js'
저는 제 프로젝트 이름을 전혀 포함하지 않은 채, 그것이 읽으려는 경로 위에 있는 것을 볼 수 있기 때문에, 제가 멀리까지 탐색하고 있다는 것을 알게 되었습니다.
수정 사항은 다음과 같습니다.
"styles": [
"src/styles.css",
"../node_modules/bootstrap/dist/css/bootstrap.min.css"
],
"scripts": [
"../node_modules/jquery/dist/jquery.min.js",
"../node_modules/bootstrap/dist/js/bootstrap.min.js"
]
받는 사람:
"styles": [
"src/styles.css",
"node_modules/bootstrap/dist/css/bootstrap.min.css"
],
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"node_modules/bootstrap/dist/js/bootstrap.min.js"
]
언급URL : https://stackoverflow.com/questions/50366935/enoent-no-such-file-or-directory-for-node-modules-jquery-dist-jquery-min-js
반응형
'sourcetip' 카테고리의 다른 글
스위프트에서 관련 객체를 설정하는 방법이 있습니까? (0) | 2023.10.20 |
---|---|
로컬 호스트에서만 get/post 요청 수락 (0) | 2023.10.20 |
인라인 CSS가 뭐가 그렇게 안 좋습니까? (0) | 2023.10.20 |
신호 R "신호기/허브"에서 404 오류 발생 (0) | 2023.10.20 |
jQuery에서 '정의되지 않은' 값을 확인하는 방법 (0) | 2023.10.15 |