I'm using parcel-bundler for sass on my projects, I've always used npm start instead of npm run build and it has always worked for me. But this time, when I try to deploy my project on Vercel, it failed and it says "Error: Command "npm run build" exited with 127"?
I already tried setting the CI Environment Variable to false Using Vercel CLI but it's still giving me the same result.
package.json
{
"name": "portfolio",
"version": "1.0.0",
"description": "",
"source": "src/index.html",
"scripts": {
"start": "parcel src/index.html",
"build": "parcel build src/index.html"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"sass": "^1.52.2"
}
}
[21:07:21.022] Cloning completed: 371.994ms
[21:07:21.103] Installing build runtime...
[21:07:22.998] Build runtime installed: 1.894s
[21:07:23.868] No Build Cache available
[21:07:24.021] Installing dependencies...
[21:07:25.307]
[21:07:25.308] added 17 packages in 1s
[21:07:25.308]
[21:07:25.308] 2 packages are looking for funding
[21:07:25.308] run `npm fund` for details
[21:07:25.510] Detected `package-lock.json` generated by npm 7...
[21:07:25.510] Running "npm run build"
[21:07:25.783]
[21:07:25.784] > portfolio@1.0.0 build
[21:07:25.784] > parcel build src/index.html
[21:07:25.784]
[21:07:25.789] sh: parcel: command not found
[21:07:25.798] Error: Command "npm run build" exited with 127
You are using Parcel but it's not listed in your devDependencies. My guess is that you have it installed globally. Try adding it as a local devDependency:
npm install --save-dev parcel