-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Description
What / Why
I need to run: npm prune
from this line in this Heroku buildpack: https://github.com/gjaldon/heroku-buildpack-phoenix-static/blob/master/lib/build.sh#L137
I experience the following error:
npm ERR! invalid bin entry for package [email protected]. key=jsesc, value=bin/jsesc
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/samhstn/.npm/_logs/2019-12-18T17_08_55_527Z-debug.log
Which produced the following debug log: 2019-12-18T17_08_55_527Z-debug.log
When
The error only occurs when running npm prune
when no node_modules
are present and it can occur for more than just the jsesc
module.
But npm prune
works fine when we have installed our node_modules
.
Where
The error occurs from a clean build on our Heroku ci and for me locally on my osx machine.
How
From cloning this repository: https://github.com/samhstn/invalid-bin-entry, then running:
cd assets
npm prune
produces the error
What should I do to debug this type of error going forward? And how can I get my Heroku buildpack to successfully run the npm prune
command?