parcel icon indicating copy to clipboard operation
parcel copied to clipboard

Parcel incorrectly reporting that elm.json is missing

Open zack opened this issue 1 year ago • 0 comments

🐛 bug report

Hello, I'm trying to build a project and @parcel/elm-transformer is telling me that elm.json does not exist. But it does. This is a pretty old project that I do not touch routinely. Every once in a blue moon I will make a small change to the code, pull it down to this server, and run the parcel build command. I don't recall ever having a problem before. I'm not sure what has changed.

🎛 Configuration (.babelrc, package.json, cli command)

package.json

{
  "devDependencies": {
    "@parcel/transformer-elm": "^2.12.0",
    "elm": "^0.19.1-5",
    "elm-hot": "^1.1.6",
    "node-elm-compiler": "^5.0.6",
    "parcel": "^2.12.0"
  },
  "scripts": {
    "serve": "parcel serve",
    "parcel": "parcel"
  },
  "source": "src/index.html"
}

🤔 Expected Behavior

The code is built and put into dist

😯 Current Behavior

I receive an error that elm.json is missing:


zack@youngrenio:/var/www/rpe.youngren.io$ ls
dist  elm.json  elm-stuff  node_modules  package.json  package-lock.json  public  README.md  src
zack@youngrenio:/var/www/rpe.youngren.io$ cat elm.json 
{
    "type": "application",
    "source-directories": [
        "src"
    ],
    "elm-version": "0.19.1",
    "dependencies": {
        "direct": {
            "NoRedInk/elm-json-decode-pipeline": "1.0.0",
            "elm/browser": "1.0.2",
            "elm/core": "1.0.4",
            "elm/html": "1.0.0",
            "elm/json": "1.1.2"
        },
        "indirect": {
            "elm/time": "1.0.0",
            "elm/url": "1.0.0",
            "elm/virtual-dom": "1.0.2"
        }
    },
    "test-dependencies": {
        "direct": {
            "elm-explorations/test": "1.0.0"
        },
        "indirect": {
            "elm/random": "1.0.0"
        }
    }
}
zack@youngrenio:/var/www/rpe.youngren.io$ npx parcel build src/index.html 
🚨 Build failed.

@parcel/elm-transformer: The 'elm.json' file is missing.
💡 Initialize your elm project by running 'elm init'
💡 If you installed elm as project dependency then run 'yarn elm init' or 'npx elm init'

💁 Possible Solution

No clue.

🔦 Context

I am unable to generate a production build.

💻 Code Sample

https://www.github.com/zack/rpe-elm

🌍 Your Environment

Software Version(s)
Parcel 2.12.0
Node 20.11.1
npm/Yarn npm 10.2.4
Operating System Ubuntu 20.04.5 LTS

Thank you

Appreciate your help :)

zack avatar Jul 11 '24 14:07 zack