Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heroku Deployment Fail: npm WARN checkPermissions Missing write access #22

Closed
nelsonic opened this issue Mar 1, 2020 · 12 comments
Closed

Comments

@nelsonic
Copy link
Member

nelsonic commented Mar 1, 2020

While attempting to deploy this app to Heroku, we are seeing the following error:

-----> Building dependencies
       Installing and caching node modules
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! invalid bin entry for package @babel/parser@7.8.4. key=parser, value=bin/babel-parser.js
npm ERR! A complete log of this run can be found in:
npm ERR!     /app/.npm/_logs/2020-03-01T00_22_53_264Z-debug.log
 !     Push rejected, failed to compile Phoenix app.
 !     Push failed
@nelsonic
Copy link
Member Author

nelsonic commented Mar 1, 2020

nelsonic added a commit that referenced this issue Mar 1, 2020
@nelsonic
Copy link
Member Author

nelsonic commented Mar 1, 2020

Known issue reported by @samhstn npm/cli#613 💭

nelsonic added a commit that referenced this issue Mar 1, 2020
@nelsonic
Copy link
Member Author

nelsonic commented Mar 1, 2020

Downloading and installing node 12.16.1...
       Installing Node 12.16.1...
       Downloading and installing npm 6.13.7 (replacing version 6.13.4)...

This is promising ...

@nelsonic
Copy link
Member Author

nelsonic commented Mar 1, 2020

Spoke too soon ...

npm timing npm Completed in 3531ms
npm info ok 
       npm WARN checkPermissions Missing write access to /tmp/build_25f399ac5fbb0663d2f70dd175733106/assets/node_modules/phoenix
       npm WARN checkPermissions Missing write access to /tmp/build_25f399ac5fbb0663d2f70dd175733106/assets/node_modules/phoenix_html
       npm ERR! code ENOENT
       npm ERR! syscall access
       npm ERR! path /tmp/build_25f399ac5fbb0663d2f70dd175733106/assets/node_modules/phoenix
       npm ERR! errno -2
       npm ERR! enoent ENOENT: no such file or directory, access '/tmp/build_25f399ac5fbb0663d2f70dd175733106/assets/node_modules/phoenix'
       npm ERR! enoent This is related to npm not being able to find a file.
       npm ERR! enoent
       
       npm ERR! A complete log of this run can be found in:
       npm ERR!     /app/.npm/_logs/2020-03-01T02_03_35_880Z-debug.log
 !     Push rejected, failed to compile Phoenix app.
 !     Push failed

nelsonic added a commit that referenced this issue Mar 1, 2020
@nelsonic
Copy link
Member Author

nelsonic commented Mar 1, 2020

I'm losing the will ... https://dashboard.heroku.com/apps/phemail/activity/builds/346537d3-9312-46c7-aec8-1d229c7aa01d
image

       npm WARN checkPermissions Missing write access to /tmp/build_f9de20f9568fdb6885359dc1065e7edf/assets/node_modules/phoenix
       npm WARN checkPermissions Missing write access to /tmp/build_f9de20f9568fdb6885359dc1065e7edf/assets/node_modules/phoenix_html
       npm ERR! code ENOENT
       npm ERR! syscall access
       npm ERR! path /tmp/build_f9de20f9568fdb6885359dc1065e7edf/assets/node_modules/phoenix
       npm ERR! errno -2
       npm ERR! enoent ENOENT: no such file or directory, access '/tmp/build_f9de20f9568fdb6885359dc1065e7edf/assets/node_modules/phoenix'
       npm ERR! enoent This is related to npm not being able to find a file.
       npm ERR! enoent
       
       npm ERR! A complete log of this run can be found in:
       npm ERR!     /app/.npm/_logs/2020-03-01T02_14_22_548Z-debug.log
 !     Push rejected, failed to compile Phoenix app.
 !     Push failed

Why would NPM not have access to this file?!

@nelsonic nelsonic changed the title npm ERR! invalid bin entry for package @babel/parser@7.8.4 Heroku Deployment Fail: npm WARN checkPermissions Missing write access Mar 1, 2020
@nelsonic
Copy link
Member Author

nelsonic commented Mar 1, 2020

https://elixirforum.com/t/heroku-deploy-issues-with-phoenix-1-3/5710 instructs to add:

assets_path=assets
phoenix_ex=phx

To the phoenix_static_buildpack.config file ... trying that now.

@nelsonic
Copy link
Member Author

nelsonic commented Mar 1, 2020

npm ERR! enoent ENOENT: no such file or directory, access 'assets/node_modules/phoenix'

According to: geolessel/react-phoenix#35 (comment)
Deleting the package-lock.json file and npm install again might do the trick ...

@nelsonic
Copy link
Member Author

nelsonic commented Mar 1, 2020

After reading gjaldon/heroku-buildpack-phoenix-static#55 (comment)
I discovered that the order of the build packs matters ... 🙄

Before:
image
After:
image

#FFS 3 Hours Later...! 🤦‍♂

At least the deployment works ...

image

@btrd
Copy link

btrd commented Apr 8, 2020

I just had the exact same issue on another project, I also had to add this to the phoenix_static_buildpack.config file :

npm_version=6.14.4

@nelsonic
Copy link
Member Author

nelsonic commented Apr 8, 2020

@btrd thanks for sharing. 🥇

@SolbiatiAlessandro
Copy link

After reading gjaldon/heroku-buildpack-phoenix-static#55 (comment)
I discovered that the order of the build packs matters ... 🙄

Before:
image
After:
image

#FFS 3 Hours Later...! 🤦‍♂

At least the deployment works ...

image

worked for me, fixed the issue in just 2 mins thanks so much <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants