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

Local setup fails stating Cannot find module 'graphql-tag' #7182

Closed
4 of 6 tasks
sibis opened this issue Feb 11, 2021 · 5 comments · Fixed by #7183
Closed
4 of 6 tasks

Local setup fails stating Cannot find module 'graphql-tag' #7182

sibis opened this issue Feb 11, 2021 · 5 comments · Fixed by #7183
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@sibis
Copy link

sibis commented Feb 11, 2021

New Issue Checklist

Issue Description

Local setup as mentioned in the documentation and latest docker image as well. The same error occurs when trying to run the local parse-server.

Steps to reproduce

(I) clone the repo
(2) build an image out of it as it mentioned in the doc (or)

-> just pull the latest image and run the image to reproduce this error(related to 'graphql-tag')

Actual Outcome

server gets crashed upon starting

Expected Outcome

Expect the server to run, like the older build. If I pull an older image which was released 2 months ago it all seems fine but the latest one has this issue but I'm dependent on the few changes that happened recently.

Failing Test Case / Pull Request

  • 🤩 I submitted a PR with a fix and a test case.
  • 🧐 I submitted a PR with a failing test case.

Environment

Server

  • Parse Server version: 4.5.0
  • Operating system: Mac BigSur
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): Local

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version: latest
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): Local

Client

  • SDK (iOS, Android, JavaScript, PHP, Unity, etc): Javascript
  • SDK version: latest

Logs

parse_1 | ^
parse_1 |
parse_1 | Error: Cannot find module 'graphql-tag'
parse_1 | Require stack:
parse_1 | - /parse-server/lib/GraphQL/loaders/schemaDirectives.js
parse_1 | - /parse-server/lib/GraphQL/ParseGraphQLSchema.js
parse_1 | - /parse-server/lib/GraphQL/ParseGraphQLServer.js
parse_1 | - /parse-server/lib/ParseServer.js
parse_1 | - /parse-server/lib/index.js
parse_1 | - /parse-server/lib/cli/parse-server.js
parse_1 | - /parse-server/bin/parse-server
parse_1 | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
parse_1 | at Function.Module._load (internal/modules/cjs/loader.js:725:27)
parse_1 | at Module.require (internal/modules/cjs/loader.js:952:19)
parse_1 | at require (internal/modules/cjs/helpers.js:88:18)
parse_1 | at Object. (/parse-server/lib/GraphQL/loaders/schemaDirectives.js:8:42)
parse_1 | at Module._compile (internal/modules/cjs/loader.js:1063:30)
parse_1 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
parse_1 | at Module.load (internal/modules/cjs/loader.js:928:32)
parse_1 | at Function.Module._load (internal/modules/cjs/loader.js:769:14)
parse_1 | at Module.require (internal/modules/cjs/loader.js:952:19) {
parse_1 | code: 'MODULE_NOT_FOUND',
parse_1 | requireStack: [
parse_1 | '/parse-server/lib/GraphQL/loaders/schemaDirectives.js',
parse_1 | '/parse-server/lib/GraphQL/ParseGraphQLSchema.js',
parse_1 | '/parse-server/lib/GraphQL/ParseGraphQLServer.js',
parse_1 | '/parse-server/lib/ParseServer.js',
parse_1 | '/parse-server/lib/index.js',
parse_1 | '/parse-server/lib/cli/parse-server.js',
parse_1 | '/parse-server/bin/parse-server'
parse_1 | ]
parse_1 | }
open-source_parse_1 exited with code 1

@mtrezza
Copy link
Member

mtrezza commented Feb 11, 2021

Thanks for reporting.

Maybe related to #6924. Would you take a look and see if any of the info there solves this issue?

@davimacedo davimacedo added type:bug Impaired feature or lacking behavior that is likely assumed and removed needs more info labels Feb 12, 2021
@ritterb82
Copy link

ritterb82 commented Feb 12, 2021

Is there a way to solve this on local? Do you have to do something with npm commands to resolve this?

@davimacedo
Copy link
Member

Yes. You can build your container from my branch: https://github.com/back4app/parse-server/tree/fixDockerImage

@ritterb82
Copy link

Also, wanted to point out that i couldn't install the packages due to also installing parse-dashboard, because of same basic error. Resolved my issuess by downgrading npm from v7 to v6 ( 6.14.11 ).

@nstrelow
Copy link

nstrelow commented Mar 1, 2021

I have the same problem on the latest docker image.
Any way to fix this?

EDIT: Downgrading to docker image tag 4.5.0 works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants