parse-server: Parse 3.7.0 missing APN module

Issue Description

After updating to ParseServer 3.7.0 (latest release), I can no longer start my server. It appears one of the modules (apn) for the @parse/push-adapter is missing. If I manually install the apn module, and start the parse-server, it works as usual. I do not use push-notifications in my setup, so I did not have the module installed previously.

Steps to reproduce

Update to ParseServer 3.7.0 and start the server.

Expected Results

Server should start as usual.

Actual Outcome

I receive the following error.

unhandledRejection error: { Error: Cannot find module 'apn' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Module.require (internal/modules/cjs/loader.js:690:17) at require (internal/modules/cjs/helpers.js:25:18) at Object.<anonymous> (/***/node_modules/@parse/push-adapter/lib/APNS.js:12:12) at Module._compile (internal/modules/cjs/loader.js:776:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) code: 'MODULE_NOT_FOUND' }

Environment Setup

  • Server

    • parse-server version (Be specific! Don’t say ‘latest’.) : 3.7.0
    • Operating System: macOS Mojave 10.14.5
    • Hardware: MacBook Pro 2018
    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): localhost
  • Database

    • MongoDB version: 3.6.12
    • Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): localhost

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 29 (25 by maintainers)

Most upvoted comments

I updated npm to 5.10 and that did the trick. Thank you!

@johnnydimas could you please install parse-server from the master branch and check if the problem was solved for you? In a positive case, we will release a new version.

@dplewis I actually tried that as well before I posted the issue. It didn’t seem to do the trick for me.

I did a clean npm install (removed node_modules and package-lock)

You can see it working https://github.com/parse-community/Parse-SDK-JS/pull/876

I think we didn’t release this package correctly. I will try to publish a new release and fix it.