Comments (4)
Knip v5.1 introduces a new workaround: bunx --bun knip
from knip.
This is a known issue, please see https://knip.dev/reference/known-issues
from knip.
bunx --bun knip
Using this resulted in the following error:
Computer app ‹main› » bunx --bun knip 1 ↵
[0.05ms] ".env.development"
1 | (function (process,nextTickQueue,drainMicrotasksFn,reportUncaughtExceptionFn){"use strict";var queue,process,nextTickQueue=nextTickQueue,drainMicrotasks=drainMicrotasksFn,reportUncaughtException=reportUncaughtExceptionFn;function validateFunction(cb){if(typeof cb!=="function"){const err=@makeTypeError(`The "callback" argument must be of type "function". Received type ${typeof cb}`);throw err.code="ERR_INVALID_ARG_TYPE",err}}var setup=()=>{queue=function createQueue(){class FixedCircularBuffer{constructor(){this.bottom=0,this.top=0,this.list=@newArrayWithSize(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(data){this.list[this.top]=data,this.top=this.top+1&2047}shift(){var{list,bottom}=this;const nextItem=list[bottom];if(nextItem===@undefined)return null;return list[bottom]=@undefined,this.bottom=bottom+1&2047,nextItem}}class FixedQueue{constructor(){this.head=this.tail=new FixedCircularBuffer}isEmpty(){return this.head.isEmpty()}push(data){if(this.head.isFull())this.head=this.head.next=new FixedCircularBuffer;this.head.push(data)}shift(){const tail=this.tail,next=tail.shift();if(tail.isEmpty()&&tail.next!==null)this.tail=tail.next,tail.next=null;return next}}return new FixedQueue}();function processTicksAndRejections(){var tock;do{while((tock=queue.shift())!==null){var{callback,args,frame}=tock,restore=@getInternalField(@asyncContext,0);@putInternalField(@asyncContext,0,frame);try{if(args===@undefined)callback();else switch(args.length){case 1:callback(args[0]);break;case 2:callback(args[0],args[1]);break;case 3:callback(args[0],args[1],args[2]);break;case 4:callback(args[0],args[1],args[2],args[3]);break;default:callback(...args);break}}catch(e){reportUncaughtException(e)}finally{@putInternalField(@asyncContext,0,restore)}}drainMicrotasks()}while(!queue.isEmpty())}@putInternalField(nextTickQueue,0,0),@putInternalField(nextTickQueue,1,queue),@putInternalField(nextTickQueue,2,processTicksAndRejections),setup=@undefined};function nextTick(cb,args){if(validateFunction(cb),setup)setup(),process=globalThis.process;if(process._exiting)return;queue.push({callback:cb,args:@argumentCount()>[email protected].@call(arguments,1):@undefined,frame:@getInternalField(@asyncContext,0)}),@putInternalField(nextTickQueue,0,1)}return nextTick})
^
SyntaxError: Import named 'parseArgs' not found in module 'util'.
at processTicksAndRejections (:1:2602)
error: "knip" exited with code 1 (SIGHUP)
from knip.
You might be on a version of Bun that doesn't have parseArgs
yet, not sure when exactly they introduced. Please try the latest?
from knip.
Related Issues (20)
- Commitlint plugin: specifier.startsWith is not a function HOT 1
- commitlint plugin update breaks when `parserPreset` isn't a `string`
- SvelteKit Demo App $app/* unresolved HOT 2
- 5.14.0 breaks knip in git submodules
- Documentation Site Version Selector leads to 404 HOT 2
- Support local custom plugin HOT 2
- Support import.meta.resolve (in Pino v7+ transports) HOT 3
- Unused functions are not being detected HOT 5
- Default import name being used to determine if export is used HOT 7
- Re-exported enum members incorrectly reported as unused HOT 7
- False positive when using a dynamic default importing HOT 2
- Module '"knip"' has no exported member 'KnipConfig'. Did you mean to use 'import KnipConfig from "knip"' instead? HOT 3
- "ignore" file working even though it shouldn't based on the docs HOT 4
- [Svelte@5] Knip fails to resolve `*.svelte.(j|t)s` files HOT 4
- Run the script only against the staged files. HOT 2
- `ignore` is not applied for Auto-fix HOT 1
- Not working with @emotion/styled during string interpolation HOT 1
- 'TypeError: importItems.importedAs.entries is not a function' error when using --cache, but not without the cache HOT 2
- Dependency reported as "unused" even if it's used with require.resolve(...) HOT 5
- Fails to run due to TypeError in `graphql-codegen` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from knip.