Zaid-Ajaj / Femto

Femto is a CLI tool that automatically resolves npm packages used by Fable bindings
153 stars 13 forks source link

femto --resolve generates abundant errors #107

Closed houstonhaynes closed 2 months ago

houstonhaynes commented 2 months ago

I'm trying to get my bearings with Feliz.MaterialUI and seeing a huge swath of errors. This same error "runs off the screen" - outrunning the console buffer. This is just a sample.

[11:55:59 ERR] Couldn't decode 'D:\repos\MuiTest\package.json' from D:\repos\MuiTest\package.json. Reason: I run into the following problems:

Error at: `$`
Expecting an object with a field named `name` but instead got:
{
    "private": true,
    "scripts": {
        "start": "dotnet tool restore && dotnet fable watch src --runFast vite",
        "build": "dotnet tool restore && dotnet fable src --run vite build",
        "clean": "dotnet fable clean src --yes"
    },
    "dependencies": {
        "material-ui": "^0.20.0",
        "react": "^18.2.0",
        "react-dom": "^18.2.0"
    },
    "devDependencies": {
        "@vitejs/plugin-react": "^3.1.0",
        "vite": "^4.1.0"
    },
    "engines": {
        "node": ">=18"
    }
}

Error at: `$`
Expecting an object with a field named `version` but instead got:
{
    "private": true,
    "scripts": {
        "start": "dotnet tool restore && dotnet fable watch src --runFast vite",
        "build": "dotnet tool restore && dotnet fable src --run vite build",
        "clean": "dotnet fable clean src --yes"
    },
    "dependencies": {
        "material-ui": "^0.20.0",
        "react": "^18.2.0",
        "react-dom": "^18.2.0"
    },
    "devDependencies": {
        "@vitejs/plugin-react": "^3.1.0",
        "vite": "^4.1.0"
    },
    "engines": {
        "node": ">=18"
    }
}
[11:55:59 INF] Executing required actions for package resolution
[11:55:59 INF] Installing dependencies [@material-ui/icons@4.11.3, @material-ui/core@4.12.4, @material-ui/lab@4.0.0-alpha.56]
[11:56:00 ERR] Error while installing @material-ui/icons@4.11.3, @material-ui/core@4.12.4, @material-ui/lab@4.0.0-alpha.56

I'm not exactly sure how to remediate at this is the first time in a few years I've wandered into the dependency challenges in this tech stack. But overall it looks like there's some unpacking/resolving to do here - and frankly I'm a bit out of practice/out of my depth.

> npm install
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: material-ui@0.20.0
npm error Found: react@18.3.1
npm error node_modules/react
npm error   react@"^18.2.0" from the root project
npm error   peer react@"^18.3.1" from react-dom@18.3.1
npm error   node_modules/react-dom
npm error     react-dom@"^18.2.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer react@"^15.4.0 || ^16.0.0" from material-ui@0.20.0
npm error node_modules/material-ui
npm error   material-ui@"^0.20.0" from the root project
npm error
npm error Conflicting peer dependency: react@16.14.0
npm error node_modules/react
npm error   peer react@"^15.4.0 || ^16.0.0" from material-ui@0.20.0
npm error   node_modules/material-ui
npm error     material-ui@"^0.20.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error C:\Users\h3tec\scoop\persist\nodejs\cache\_logs\2024-09-17T15_59_59_382Z-eresolve-report.txt
npm error A complete log of this run can be found in: C:\Users\h3tec\scoop\persist\nodejs\cache\_logs\2024-09-17T15_59_59_382Z-debug-0.log