remote: Skipping 'fsevents' build as platform linux is not supported remote: npm ERR! Cannot read property 'length' of undefined remote: remote: npm ERR! A complete log of this run can be found in: remote: npm ERR! /tmp/npmcache.Ta3zs/_logs/2020-06-01T23_28_55_378Z-debug.log
insert code below to scripts in package.json "scripts": { "heroku-prebuild": "npm install -f", "heroku-postbuild": "npm run build" }
Still getting the error after adding the scripts. And what npm run build supposed to be doing? Laravel's package.json scripts by default only has dev, watch and prod.
I am not sure if build is an old key for prod. Please correct me if I'm wrong.
I got it working using this:
"postinstall": "npm run production", "heroku-prebuild": "npm install -f", "heroku-postbuild": "npm run production"
That rebuilt the assets multiple times, so I trimmed it down to just this and it seems to be all that is needed. At least, it is working for me now:
"heroku-postbuild": "npm run production"
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
remote: Skipping 'fsevents' build as platform linux is not supported
remote: npm ERR! Cannot read property 'length' of undefined
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /tmp/npmcache.Ta3zs/_logs/2020-06-01T23_28_55_378Z-debug.log
insert code below to scripts in package.json
"scripts": {
"heroku-prebuild": "npm install -f",
"heroku-postbuild": "npm run build"
}
Still getting the error after adding the scripts. And what npm run build supposed to be doing? Laravel's package.json scripts by default only has dev, watch and prod.
I am not sure if build is an old key for prod. Please correct me if I'm wrong.
I got it working using this:
That rebuilt the assets multiple times, so I trimmed it down to just this and it seems to be all that is needed. At least, it is working for me now: