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

Install error on npm 7 #1639

Closed
3 tasks done
tristanyi opened this issue Jan 13, 2021 · 14 comments
Closed
3 tasks done

Install error on npm 7 #1639

tristanyi opened this issue Jan 13, 2021 · 14 comments
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@tristanyi
Copy link

tristanyi commented Jan 13, 2021

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Dashboard!

  • You're running version >=1.0.23 of Parse Dashboard.

  • You're running version >=2.3.2 of Parse Server.

  • You've searched through existing issues. Chances are that your issue has been reported or resolved before.

Environment Setup

ubuntu18
node 14
npm 6

Steps to reproduce

npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] postinstall: node -e "try{require('./postinstall')}catch(e){}"
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Logs/Trace

Note: If you get a browser JS error please run npm run dev. This will provide source maps and a much more useful stack trace.

@elrumo
Copy link

elrumo commented Jan 24, 2021

I'm also having issues installing parse-server from NPM. I get dependancy errors and I can't install it

@siempay
Copy link

siempay commented Mar 22, 2021

I am having same problem right now !

@dplewis
Copy link
Member

dplewis commented Mar 22, 2021

Can you try ignore scripts flag on install?

npm install --ignore-scripts

@siempay
Copy link

siempay commented Mar 22, 2021

Just tried it and it failed too

npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! Found: [email protected]
npm ERR! node_modules/parse-dashboard/node_modules/graphql
npm ERR!   graphql@"14.6.0" from [email protected]
npm ERR!   node_modules/parse-dashboard
npm ERR!     parse-dashboard@"*" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer graphql@"^0.11.0 || ^0.12.0 || ^0.13.0" from [email protected]
npm ERR! node_modules/parse-dashboard/node_modules/codemirror-graphql/node_modules/graphql-language-service-interface/node_modules/graphql-import
npm ERR!   graphql-import@"^0.4.4" from [email protected]
npm ERR!   node_modules/parse-dashboard/node_modules/codemirror-graphql/node_modules/graphql-language-service-interface/node_modules/graphql-config
npm ERR!     graphql-config@"2.0.1" from [email protected]
npm ERR!     node_modules/parse-dashboard/node_modules/codemirror-graphql/node_modules/graphql-language-service-interface
npm ERR!       graphql-language-service-interface@"^1.0.18" from [email protected]
npm ERR!       node_modules/parse-dashboard/node_modules/codemirror-graphql
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /Users/brahimelmssilha/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:

@dblythy
Copy link
Member

dblythy commented Mar 29, 2021

I too, get the same error as @siempay.

Replication:

  1. Create a package.json file in a new directory with the contents:
{
  "dependencies": {
    "parse-dashboard": "^2.1.0",
    "parse-server": "^4.5.0"
  }
}
  1. run npm install, or npm install --ignore-scripts

@dblythy
Copy link
Member

dblythy commented May 19, 2021

As previously discussed, this only happens on the latest version of npm on certain devices. I solved by downgrading npm to 6.14.10.

@amankch
Copy link

amankch commented Jun 15, 2021

resolved with yarn add parse-dashboard --save. Maybe it will help others. graphql warning still there.

@0biWanKenobi
Copy link

Hi all,

this still happens. Current npm LTS is 7.20.6, and for most users it's not feasible to downgrade.. Could this problem be fixed?

@mtrezza
Copy link
Member

mtrezza commented Aug 19, 2021

There is another issue (which I can't find now) that has been opened regarding this. It seems to be an issue with the graphql dependency and npm 7 compatibility. We have an open PR to upgrade the dependency, which probably will solve this issue. The PR is a major version upgrade, so it requires some refactoring, that's why it is not merged yet. It would be great if someone could look into this.

@mtrezza mtrezza added the type:bug Impaired feature or lacking behavior that is likely assumed label Aug 19, 2021
@0biWanKenobi
Copy link

0biWanKenobi commented Aug 19, 2021

There is another issue [...]

Probably #1633 ? Yeah I've seen the PR, and I even used that branch locally to ease my development, seems to work - of course it would need rigorous testing though. I mainly commented here in hopes the problem gets picked up, as someone mentioned it's really a bad first hands-on experience for a developer; I know it has been for me. I struggled a lot and ended up finding a fork on npmjs that ""works"", but if my company hadn't decided to use Parse, I know I'd have jumped ship to Firebase.

@mtrezza
Copy link
Member

mtrezza commented Aug 19, 2021

@0biWanKenobi Thanks for sharing your concern. I agree that this is something we should fix ASAP, also since npm 6 is already considered "legacy" by node.

Would you be willing to take a look at the PR and try to update to the next version of the GraphQL dependency?

As far as I remember, the alternative solution would be to remove the GraphQL playground from the dashboard, because I think that is the only feature that requires the GraphQL package. That would of course be a drastic step for people who use that feature, but if we can't get it to work otherwise, it may be the only way forward.

@mtrezza mtrezza changed the title install error Install error on npm 7 Aug 19, 2021
@0biWanKenobi
Copy link

Would you be willing to take a look at the PR and try to update to the next version of the GraphQL dependency?

Yeah ideally I'd love to, but work hours don't leave much free time 😞 If someone can pick this up, it would be awesome

@dblythy
Copy link
Member

dblythy commented Sep 19, 2021

My rather odd solution to this is:

yarn install && rm yarn.lock && npm install && rm -rf node_modules && npm install

Yarn can install fine, and once node_modules are there, npm seems to be able to build package-lock.json. From there, you can remove node_modules, and install using npm (as the way yarn installs dependancies files seems to be different). Once package-lock.json has been built with npm 7, the error doesn't seem to come again.

Not sure if there are any unknown side effects. Seems to be working fine for the time being.

@dblythy
Copy link
Member

dblythy commented Sep 29, 2021

This issue was mainly caused by graph-ql-playground no longer receiving updates. This is because graph-ql-playground is no longer maintained, in favour of graph-iql.

If you use the GraphQL playground in Parse Dashboard, you'll notice that it has been changed in v3.1.0.

All install issues on npm v7 should be resolved in v3.1.0.

Please let us know if you have installation issues with v3.1.0, or any issues with the new GraphQL playground.

@dblythy dblythy closed this as completed Sep 29, 2021
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

No branches or pull requests

8 participants