Giter Club home page Giter Club logo

[BUG] <title>Could not resolve dependency: npm WARN peer @craco/craco@"^6.0.0" from [email protected] about cli HOT 3 CLOSED

Traveler001 avatar Traveler001 commented on September 27, 2024
[BUG] Could not resolve dependency: npm WARN peer @craco/craco@"^6.0.0" from craco-less@2.0.0<p>from cli.</p></section> </section> </article> <article> <h2 class="h2">Comments (3)</h2> <section class="issue-comment"> <section id="2066160965" class="issue-head"> <img class="issue-avatar" src="https://avatars.githubusercontent.com/u/8344688?v=4" alt="revelt avatar" /> <a class="issue-username" href="/revelt">revelt</a> <span class="issue-time"> commented on September 27, 2024 </span> </section> <section class="markdown markdown-js p-5"><p dir="auto">this line is telling us that it can't resolve the dependency <code class="notranslate">@craco/craco</code>:</p> <blockquote> <p dir="auto">npm WARN Could not resolve dependency:</p> </blockquote> <p dir="auto">and <code class="notranslate">craco</code> seems to be called as a peer dependency by <code class="notranslate">craco-less</code>:</p> <blockquote> <p dir="auto">peer @craco/craco@"^6.0.0" from craco-less@2.0.0</p> </blockquote> <p dir="auto">so, the next question is, do you have <code class="notranslate">@craco/craco</code> among dev dependencies in package.json? If you don't, it's a good idea to install it, <code class="notranslate">npm i -D @craco/craco</code>.</p> <p dir="auto">Also, a very handy command — you can check in npm tree, is something installed by <code class="notranslate">npm ls</code> — for example, <code class="notranslate">npm ls @craco/craco</code> can tell you is it present in the node_modules and exactly where and why.</p> <p dir="auto">I don't think it's an <code class="notranslate">npm</code> issue — we developers are responsible for installing missing dependencies and fixing any clashes.</p><p>from cli.</p></section> </section> <section class="issue-comment"> <section id="2067873246" class="issue-head"> <img class="issue-avatar" src="https://avatars.githubusercontent.com/u/36607?v=4" alt="wraithgar avatar" /> <a class="issue-username" href="/wraithgar">wraithgar</a> <span class="issue-time"> commented on September 27, 2024 </span> </section> <section class="markdown markdown-js p-5"><p dir="auto">Yes, this is not an npm issue. npm is being asked to install an impossible tree and erroring.</p> <p dir="auto">The <code class="notranslate">Exit handler not called</code> is a different issue altogether. See <a href="https://github.com/npm/cli/wiki/%22cb()-never-called%3F-Exit-handler-never-called%3F-I'm-having-the-same-problem!%22">here</a> for more info</p><p>from cli.</p></section> </section> <section class="issue-comment"> <section id="2076120441" class="issue-head"> <img class="issue-avatar" src="https://avatars.githubusercontent.com/u/18577699?s=30&u=18535350440b8087946555240e4c93652756884d&v=4" alt="Traveler001 avatar" /> <a class="issue-username" href="/Traveler001">Traveler001</a> <span class="issue-time"> commented on September 27, 2024 </span> </section> <section class="markdown markdown-js p-5"><p dir="auto">Thank you, yes, after further investigation, this error was that this tool create-react-app has been deprecated for some time, and some of its dependencies too.<br> I used Vite instead and it worked well.</p> <p dir="auto">Thanks all for the input.</p><p>from cli.</p></section> </section> </article> <section> <h2 class="h2">Related Issues (20)</h2> <div class="issue"> <ul> <li> <a href="/npm/cli/issues/7739">[BUG] git dependencies cause weird behaviour when git is not installed</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 2</span> </li> <li> <a href="/npm/cli/issues/7740">[BUG] DevDependancy are installed in production when also marked as optional peerDependencies</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 8</span> </li> <li> <a href="/npm/cli/issues/7741">[BUG] outdated does not report packages in unnamed workspaces</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 1</span> </li> <li> <a href="/npm/cli/issues/7744">[BUG] Inconsistent audit json</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 3</span> </li> <li> <a href="/npm/cli/issues/7745">[BUG] `npm i` does not set `["packages"][""]["name"]` in package-lock.json when there is no name in package.json while `npm audit fix` sets that to project's directory name</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 7</span> </li> <li> <a href="/npm/cli/issues/7746">[BUG] `npm install` sometimes removes indirect dependencies if a parent node was deleted from the lockfile</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 2</span> </li> <li> <a href="/npm/cli/issues/7748">[BUG] The .gitignore file is renamed to .npmignore when npm install</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 2</span> </li> <li> <a href="/npm/cli/issues/7750">[BUG] The package-lock.json file depends on node_modules, which will cause the lock generated by npm i to be inconsistent after the lock file is deleted when some packages that depend on the system architecture (such as node-unix-socket) are installed again.</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 3</span> </li> <li> <a href="/npm/cli/issues/7751">Start </a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 1</span> </li> <li> <a href="/npm/cli/issues/7753">[BUG] Project name was being added to dependencies automatically</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 7</span> </li> <li> <a href="/npm/cli/issues/7754">Align npm packages to npm 10's node engine range</a> </li> <li> <a href="/npm/cli/issues/7755">Problem: CORS Error When Accessing Swagger API Deployed on AWS EC2</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 1</span> </li> <li> <a href="/npm/cli/issues/7760">Error: The programmatic API was removed in npm v8.0.0</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 7</span> </li> <li> <a href="/npm/cli/issues/7761">[BUG] npx fails to find local packages in project directory when using fnm</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 1</span> </li> <li> <a href="/npm/cli/issues/7762">[BUG] `npm pack` marks the wrong files as executable</a> </li> <li> <a href="/npm/cli/issues/7763">npm error code ENOENT npm error syscall lstat npm error path C:\Users\hoang\AppData\Roaming\npm npm error errno -4058 npm error enoent ENOENT: no such file or directory, lstat 'C:\Users\hoang\AppData\Roaming\npm' npm error enoent This is related to npm not being able to find a file. npm error enoent npm error A complete log of this run can be found in: C:\Users\hoang\AppData\Local\npm-cache\_logs\2024-09-02T15_31_36_800Z-debug-0.log</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 1</span> </li> <li> <a href="/npm/cli/issues/7765">[DOCS] arborist doesnt mention pnpm and yarn support </a> </li> <li> <a href="/npm/cli/issues/7768">[BUG] npm error Exit handler never called!</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 7</span> </li> <li> <a href="/npm/cli/issues/7769">[BUG] <title> error in RUN npm install</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 1</span> </li> <li> <a href="/npm/cli/issues/7770">[BUG] Failed to publish package to `registry.npmjs.org`</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 2</span> </li> </ul> </div> </section> </main> <section id="more" class="flex-none w-full md:w-60 text-gray-600 bg-gray-50 px-5 md:px-3 rounded-md dark-color"> <div class="w-full md:w-60 h-0.5"></div> <section> <!-- recommend projects --> <h2 class="h2 py-3.5">Recommend Projects</h2> <ul> <li class="mb-4"> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/facebook/react"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://raw.githubusercontent.com/facebook/create-react-app/master/packages/cra-template/template/public/logo192.png" alt="React photo" /> React </a> </h3> <p class="article-more pt-1">A declarative, efficient, and flexible JavaScript library for building user interfaces.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/vuejs/vue"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://camo.githubusercontent.com/c8f91d18976e27123643a926a2588b8d931a0292fd0b6532c3155379e8591629/68747470733a2f2f7675656a732e6f72672f696d616765732f6c6f676f2e706e67" alt="Vue.js photo" /> Vue.js </a> </h3> <p class="article-more pt-1">🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/microsoft/TypeScript"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://www.typescriptlang.org/favicon-32x32.png" alt="Typescript photo" /> Typescript </a> </h3> <p class="article-more pt-1">TypeScript is a superset of JavaScript that compiles to clean JavaScript output.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/tensorflow/tensorflow"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://camo.githubusercontent.com/c04e16c05de80dadbdc990884672fc941fdcbbfbb02b31dd48c248d010861426/68747470733a2f2f7777772e74656e736f72666c6f772e6f72672f696d616765732f74665f6c6f676f5f736f6369616c2e706e67" alt="TensorFlow photo" /> TensorFlow </a> </h3> <p class="article-more pt-1">An Open Source Machine Learning Framework for Everyone</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/django/django"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://avatars2.githubusercontent.com/u/27804?s=200&v=4" alt="Django photo" /> Django </a> </h3> <p class="article-more pt-1">The Web framework for perfectionists with deadlines.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/laravel/laravel"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://laravel.com/img/logomark.min.svg" alt="Laravel photo" /> Laravel </a> </h3> <p class="article-more pt-1">A PHP framework for web artisans</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/d3/d3"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://camo.githubusercontent.com/586ccf0aad9684edc821658cee04146cf36d1f1d5ec904bbefd72728909ccb2e/68747470733a2f2f64336a732e6f72672f6c6f676f2e737667" alt="D3 photo" /> D3 </a> </h3> <p class="article-more pt-1">Bring data to life with SVG, Canvas and HTML. 📊📈🎉</p> </article> </li> <li> <div> </div> </li> </ul> </section> <section> <!-- recommend topics --> <h2 class="h2 py-3.5">Recommend Topics</h2> <ul> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/topic/javascript"> javascript </a> </h3> <p class="article-more pt-1">JavaScript (JS) is a lightweight interpreted programming language with first-class functions.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/topic/web"> web </a> </h3> <p class="article-more pt-1">Some thing interesting about web. New door for the world.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/topic/server"> server </a> </h3> <p class="article-more pt-1">A server is a program made to process requests and deliver data to clients.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/topic/machine-learning"> Machine learning </a> </h3> <p class="article-more pt-1">Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/topic/visualization"> Visualization </a> </h3> <p class="article-more pt-1">Some thing interesting about visualization, use data art</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/topic/game"> Game </a> </h3> <p class="article-more pt-1">Some thing interesting about game, make everyone happy.</p> </article> </li> <li> </li> </ul> </section> <section> <!-- recommend users --> <h2 class="h2 py-3.5">Recommend Org</h2> <ul> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/facebook"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://avatars.githubusercontent.com/u/69631?v=4" alt="Facebook photo" /> Facebook </a> </h3> <p class="article-more pt-1">We are working to build community through open source technology. NB: members must have two-factor auth.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/microsoft"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://avatars.githubusercontent.com/u/6154722?v=4" alt="Microsoft photo" /> Microsoft </a> </h3> <p class="article-more pt-1">Open source projects and samples from Microsoft.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/google"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://avatars.githubusercontent.com/u/1342004?v=4" alt="Google photo" /> Google </a> </h3> <p class="article-more pt-1">Google ❤️ Open Source for everyone.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/alibaba"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://avatars.githubusercontent.com/u/1961952?v=4" alt="Alibaba photo" /> Alibaba </a> </h3> <p class="article-more pt-1">Alibaba Open Source for everyone</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/d3"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://avatars.githubusercontent.com/u/1562726?v=4" alt="D3 photo" /> D3 </a> </h3> <p class="article-more pt-1">Data-Driven Documents codes.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/tencent"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://avatars.githubusercontent.com/u/18461506?v=4" alt="Tencent photo" /> Tencent </a> </h3> <p class="article-more pt-1">China tencent open source team.</p> </article> </li> <li> </li> </ul> </section> </section> </div> </div> <!-- footer --> <footer class="sizeing text-xs text-center p-5"> <div>Friends: <a class="hover:underline" target="_blank" href="https://www.chanpinqingbaoju.com">ProductDiscover</a> </div> Copyright © 2024 Giter Club <!-- & <span class="block md:inline">Data Power by github.com</span> --> ❤️ <a class="hover:underline block md:inline" href="mailto:cs.victor.edison@gmail.com">Mail to me</a> </footer> </body> </html> <script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script>