Search code examples
angularnpmtimeoutmocha.jsbublejs

buble test failed when trying to npm install


whenever I use npm install it installs all the way till the end, and just as the installation would be complete this error appears,

npm ERR!   436 passing (12s)
npm ERR!   3 pending
npm ERR!   2 failing
npm ERR! 
npm ERR!   1) buble
npm ERR!        cli
npm ERR!          basic:
npm ERR!      Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
npm ERR!       at listOnTimeout (node:internal/timers:573:17)
npm ERR!       at processTimers (node:internal/timers:514:7)
npm ERR!
npm ERR!   2) buble
npm ERR!        cli
npm ERR!          compiles-directory:
npm ERR!      Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
npm ERR!       at test\test.js:120:8
npm ERR!       at ChildProcess.exithandler (node:child_process:413:7)
npm ERR!       at ChildProcess.emit (node:events:514:28)
npm ERR!       at maybeClose (node:internal/child_process:1105:16)
npm ERR!       at Process.ChildProcess._handle.onexit (node:internal/child_process:305:5)
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm WARN old lockfile
npm ERR! npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm ERR! npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm ERR! npm WARN old lockfile
npm ERR! npm WARN old lockfile
npm ERR! npm WARN deprecated [email protected]: This module has been deprecated and is no longer maintained. Please use @rollup/plugin-buble.
npm ERR! npm WARN deprecated [email protected]: acorn>=5.4.1 supports object-spread
npm ERR! npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-node-resolve.
npm ERR! npm WARN deprecated [email protected]: This module has been deprecated and is no longer maintained. Please use @rollup/plugin-json.
npm ERR! npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
npm ERR! npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-commonjs.
npm ERR! npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)     
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR!
npm ERR! src/index.js → dist/buble.es.js, dist/buble.umd.js...
npm ERR! created dist/buble.es.js, dist/buble.umd.js in 22.4s
npm ERR!
npm ERR! created dist/buble.deps.js in 19.5s
npm ERR! (node:11136) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods 
instead.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR!
npm ERR! Unknown environment/version 'nonexistent/99'. Please raise an issue at https://github.com/Rich-Harris/buble/issues
npm ERR! Unknown environment/version 'chrome/10'. Please raise an issue at https://github.com/Rich-Harris/buble/issues
npm ERR! npm ERR! code 2
npm ERR! npm ERR! path C:\Users\Lenovo\AppData\Local\npm-cache\_cacache\tmp\git-clonebH9eqF
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command C:\Windows\system32\cmd.exe /d /s /c npm test
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in: C:\Users\Lenovo\AppData\Local\npm-cache\_logs\2023-08-14T19_29_29_226Z-debug-0.log

npm ERR! A complete log of this run can be found in: C:\Users\Lenovo\AppData\Local\npm-cache\_logs\2023-08-14T19_28_09_224Z-debug-0.log

I am using an angular App, I have tried cloning a new repository and do the npm install there, but the problem still persists. So I don't think the problem is on the package.json


Solution

  • You can try this solution

    1. Delete node_modules folder
    2. Delete package-lock.json
    3. run npm cache clean -f
    4. run npm install --force