یلدا ادامه داره... ❤️ ۴۰ درصد تخفیف همه دوره‌ها

استفاده از تخفیف‌ها
ثانیه
دقیقه
ساعت
روز
jmosavi
3 سال پیش توسط jmosavi مطرح شد
3 پاسخ

راه اندازی بوت استرپ در انگولار ng-bootstrap

با سلام و عر ض ادب
در اضافه کردن بوت استرپ به پروژه انگولاریم به مشکل خوردم(جلسه 47 دوره آموزش انگولار)
دستور اصلی :

ng add @ng-bootstrap/ng-bootstrap

اما با ارور :

PS C:\Users\USER\Desktop\ToDo-App> ng add @ng-bootstrap/ng-bootstrap
Skipping installation: Package already installed
UPDATE package.json (1186 bytes)
⠹ Installing packages (npm)...npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @ng-bootstrap/ng-bootstrap@12.1.2
npm ERR! Found: @angular/common@14.0.2
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"^14.0.0" from the root project
npm ERR!   peer @angular/common@"14.0.2" from @angular/forms@14.0.2
npm ERR!   node_modules/@angular/forms
npm ERR!     @angular/forms@"^14.0.0" from the root project
npm ERR!   3 more (@angular/platform-browser, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^13.0.0" from @ng-bootstrap/ng-bootstrap@12.1.2  
npm ERR! node_modules/@ng-bootstrap/ng-bootstrap
npm ERR!   @ng-bootstrap/ng-bootstrap@"^12.1.2" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @angular/common@13.3.11
npm ERR! node_modules/@angular/common
npm ERR!   peer @angular/common@"^13.0.0" from @ng-bootstrap/ng-bootstrap@12.1.2
npm ERR!   node_modules/@ng-bootstrap/ng-bootstrap
npm ERR!     @ng-bootstrap/ng-bootstrap@"^12.1.2" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution. 
npm ERR! 
npm ERR! See C:\Users\USER\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\USER\AppData\Local\npm-cache\_logs\2022-06-20T14_24_54_081Z-debug-0.log
✖ Package install failed, see above.
The Schematic workflow failed. See above.

مواجه میشم.
از فلگ های force و legacy هم استفاده کردم اما ارور رفع نشد.
به صورت دستی هم اضافه نشد.
ممنون میشم کمکم کنید


ثبت پرسش جدید
jmosavi
تخصص : student
@jafarmosavi 3 سال پیش مطرح شد
1

دوستان مشکل حل شد

لینک استک اور فلو

باید این دستور رو وارد کنید

npm config set legacy-peer-deps true

رایموند
تخصص : مختصص وردپرس - برنامه نویس لار...
@Raymond 3 سال پیش مطرح شد
jmosavi
تخصص : student
@jafarmosavi 3 سال پیش مطرح شد
0

مرسی از راهنماییت اما افاقه نداشت.

0 verbose cli [
0 verbose cli   'F:\\node\\node.exe',
0 verbose cli   'F:\\node\\node_modules\\npm\\bin\\npm-cli.js',
0 verbose cli   'install',
0 verbose cli   '@ng-bootstrap/ng-bootstrap@12.1.2'
0 verbose cli ]
1 info using npm@8.5.5
2 info using node@v16.15.0
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 3ms
5 timing config:load:file:F:\node\node_modules\npm\npmrc Completed in 13ms
6 timing config:load:builtin Completed in 13ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:C:\Users\USER\Desktop\project1\.npmrc Completed in 0ms
10 timing config:load:project Completed in 5ms
11 timing config:load:file:C:\Users\USER\.npmrc Completed in 0ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:C:\Users\USER\AppData\Roaming\npm\etc\npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 30ms
19 timing npm:load:configload Completed in 30ms
20 timing npm:load:setTitle Completed in 0ms
21 timing config:load:flatten Completed in 5ms
22 timing npm:load:display Completed in 6ms
23 verbose logfile C:\Users\USER\AppData\Local\npm-cache\_logs\2022-06-21T06_18_13_549Z-debug-0.log
24 timing npm:load:logFile Completed in 11ms
25 timing npm:load:timers Completed in 0ms
26 timing npm:load:configScope Completed in 0ms
27 timing npm:load Completed in 50ms
28 timing arborist:ctor Completed in 1ms
29 silly logfile start cleaning logs, removing 4 files
30 timing idealTree:init Completed in 919ms
31 timing idealTree:userRequests Completed in 7ms
32 silly idealTree buildDeps
33 silly fetch manifest @ng-bootstrap/ng-bootstrap@12.1.2
34 timing arborist:ctor Completed in 0ms
35 http fetch GET 200 https://registry.npmjs.org/@ng-bootstrap%2fng-bootstrap 821ms (cache hit)
36 silly fetch manifest @angular/common@^14.0.0
37 http fetch GET 200 https://registry.npmjs.org/@angular%2fcommon 12ms (cache hit)
38 silly fetch manifest @angular/common@^13.0.0
39 silly fetch manifest @angular/core@^14.0.0
40 http fetch GET 200 https://registry.npmjs.org/@angular%2fcore 11ms (cache hit)
41 silly fetch manifest rxjs@~7.5.0
42 http fetch GET 200 https://registry.npmjs.org/rxjs 12ms (cache hit)
43 silly fetch manifest zone.js@~0.11.4
44 http fetch GET 200 https://registry.npmjs.org/zone.js 10ms (cache hit)
45 timing idealTree Completed in 1863ms
46 timing command:install Completed in 1876ms
47 verbose stack Error: unable to resolve dependency tree
47 verbose stack     at Arborist.[failPeerConflict] (F:\node\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1398:25)
47 verbose stack     at Arborist.[loadPeerSet] (F:\node\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1364:34)
47 verbose stack     at async Arborist.[buildDepStep] (F:\node\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:950:11)
47 verbose stack     at async Arborist.buildIdealTree (F:\node\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:216:7)
47 verbose stack     at async Promise.all (index 1)
47 verbose stack     at async Arborist.reify (F:\node\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:153:5)
47 verbose stack     at async Install.exec (F:\node\node_modules\npm\lib\commands\install.js:159:5)
47 verbose stack     at async module.exports (F:\node\node_modules\npm\lib\cli.js:66:5)
48 verbose cwd C:\Users\USER\Desktop\project1
49 verbose Windows_NT 10.0.19043
50 verbose argv "F:\\node\\node.exe" "F:\\node\\node_modules\\npm\\bin\\npm-cli.js" "install" "@ng-bootstrap/ng-bootstrap@12.1.2"
51 verbose node v16.15.0
52 verbose npm  v8.5.5
53 error code ERESOLVE
54 error ERESOLVE unable to resolve dependency tree
55 error
56 error While resolving: project1@0.0.0
56 error Found: @angular/common@14.0.2
56 error node_modules/@angular/common
56 error   @angular/common@"^14.0.0" from the root project
56 error
56 error Could not resolve dependency:
56 error peer @angular/common@"^13.0.0" from @ng-bootstrap/ng-bootstrap@12.1.2
56 error node_modules/@ng-bootstrap/ng-bootstrap
56 error   @ng-bootstrap/ng-bootstrap@"12.1.2" from the root project
56 error
56 error Fix the upstream dependency conflict, or retry
56 error this command with --force, or --legacy-peer-deps
56 error to accept an incorrect (and potentially broken) dependency resolution.
56 error
56 error See C:\Users\USER\AppData\Local\npm-cache\eresolve-report.txt for a full report.
57 verbose exit 1
58 timing npm Completed in 2418ms
59 verbose unfinished npm timer reify 1655792294078
60 verbose unfinished npm timer reify:loadTrees 1655792294085
61 verbose unfinished npm timer idealTree:buildDeps 1655792295013
62 verbose unfinished npm timer idealTree:#root 1655792295014
63 verbose code 1
64 error A complete log of this run can be found in:
64 error     C:\Users\USER\AppData\Local\npm-cache\_logs\2022-06-21T06_18_13_549Z-debug-0.log

این فایله لاگش هست


jmosavi
تخصص : student
@jafarmosavi 3 سال پیش مطرح شد
1

دوستان مشکل حل شد

لینک استک اور فلو

باید این دستور رو وارد کنید

npm config set legacy-peer-deps true

برای ارسال پاسخ لازم است وارد شده یا ثبت‌نام کنید

ورود یا ثبت‌نام