Comments (7)
Sure, they do but theres installed package only for my architecture.
➜ ls -l node_modules/@next/swc-darwin-arm64
total 79952
-rw-r--r-- 1 jakubchatrny staff 88 Oct 23 19:33 README.md
-rw-r--r-- 1 jakubchatrny staff 40805032 Oct 23 19:33 next-swc.darwin-arm64.node
-rw-r--r-- 1 jakubchatrny staff 268 Oct 23 19:33 package.json
➜ cat node_modules/@next/swc-darwin-arm64/package.json
{
"name": "@next/swc-darwin-arm64",
"version": "12.2.5",
"os": [
"darwin"
],
"cpu": [
"arm64"
],
"main": "next-swc.darwin-arm64.node",
"files": [
"next-swc.darwin-arm64.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
➜ ls -l node_modules/@next
total 0
drwxr-xr-x 7 jakubchatrny staff 224 Oct 23 19:33 env
drwxr-xr-x 6 jakubchatrny staff 192 Oct 23 19:33 eslint-plugin-next
drwxr-xr-x 5 jakubchatrny staff 160 Oct 23 19:33 swc-darwin-arm64
It seems that Next has somewhere reference packages of swc for all possible architectures, however only one is installed
➜ cat node_modules/next/package.json
{
"name": "next",
...
"optionalDependencies": {
"@next/swc-android-arm-eabi": "12.2.5",
"@next/swc-android-arm64": "12.2.5",
"@next/swc-darwin-arm64": "12.2.5",
"@next/swc-darwin-x64": "12.2.5",
"@next/swc-freebsd-x64": "12.2.5",
"@next/swc-linux-arm-gnueabihf": "12.2.5",
"@next/swc-linux-arm64-gnu": "12.2.5",
"@next/swc-linux-arm64-musl": "12.2.5",
"@next/swc-linux-x64-gnu": "12.2.5",
"@next/swc-linux-x64-musl": "12.2.5",
"@next/swc-win32-arm64-msvc": "12.2.5",
"@next/swc-win32-ia32-msvc": "12.2.5",
"@next/swc-win32-x64-msvc": "12.2.5"
},
"gitHead": "911ba233d9d12c0a46c87ee62e783b97583fbbd0"
}
It uses optionalDependencies
(I had no idea there's such thing).
I have working --ignore-missing-dependencies
in my branch would you be interested to have PR for such feature?
from check-licenses.
Published as [email protected]
🥳🥳
Please feel free to reopen if this is still an issue, or open a new issue if something else comes up!
from check-licenses.
Why do those have no package.json? That's very strange, any official package should have a package.json AFAIK, could you do please e.g. ls node_modules/@next/swc-linux-arm64-musl/
?
from check-licenses.
Having the same issue in my Next.js project, I would be interested in a flag to ignore this.
from check-licenses.
Do you mind sharing your package-lock.json
? At least the part relative to e.g. node_modules/@next/swc-linux-arm64-musl/
? I believe if a package is marked as optional and we don't find the package.json, we can skip it without much fuzz.
About your proposed solution, I actually implemented most of it back in the day apparently, but I see I ended up hardcoding it to require the package.json
. If you look at this line:
// Find all the required dependencies
const packages = await findDependencies(process.cwd(), {
package: "required",
});
That required
can be set to skip
, in which case it will ignore the folders without a package.json
.
from check-licenses.
Okay no worries, forget my last comment, any style preference? It will not fail with missing optional dependencies, but still fail with missing normal dependencies, which solves the issue at hand here while still being strict:
Grayed | Yellow |
---|---|
from check-licenses.
from check-licenses.
Related Issues (3)
- Failed to run with npx HOT 5
- Add pnpm support HOT 4
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 check-licenses.