Skip to content

allow use of unsecure unofficial dependencies #69

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

Open
bolds07 opened this issue Mar 10, 2023 · 2 comments
Open

allow use of unsecure unofficial dependencies #69

bolds07 opened this issue Mar 10, 2023 · 2 comments

Comments

@bolds07
Copy link

bolds07 commented Mar 10, 2023

The use case you're trying to solve
I've a next.js project which has a ton of old/outdated dependencies which another dev has just hooked in the project
Some of these dependencies are not officially compatible with react 17, but as per test they work ok.

However when using firebase-framework-tools and following all instructions to deploy next projects, on last step of firebase deploy it fails due unmatch dependency versions:

Building a Cloud Function to run this application. This is needed due to:
   • non-static route /crm/quadros/[id]
   • non-static route /crm/quadros
   • non-static route /entrar
   • non-static route /perfil/formularios

and right after that fails
because some dependencies doesn't match the react version that is being used.

npm ERR! node_modules/react
  npm ERR!   react@"^17.0.2" from the root project
  npm ERR! 
  npm ERR! Could not resolve dependency:
  npm ERR! peer react@"^16.5.2" from react-to-pdf@0.0.14
  npm ERR! node_modules/react-to-pdf
  npm ERR!   react-to-pdf@"^0.0.14" from the root project
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.
this output is the result of the action running the code

[2023-03-10T01:38:59.487Z] Error: Command failed: npm i --omit dev --no-audit
     at checkExecSyncError (node:child_process:826:11)
     at execSync (node:child_process:900:15)
     at prepareFrameworks (/home/runner/.npm/_npx/ba4f1959e38407b5/node_modules/firebase-tools/lib/frameworks/index.js:372:42)
     at async deploy (/home/runner/.npm/_npx/ba4f1959e38407b5/node_modules/firebase-tools/lib/deploy/index.js:53:13)

If it was only this dependency it would be ok, i could upgrade or just remove from project, but this project has around 120 dependencies hooked on it, many of which aren't used, most of which are outdated no longer supported and were hooked by another dev which i'm taking over his project

would be a colossal amount of work to me test one by one and try to solve this version issues individually, therefore i know that if is just do npm install --force they work fine

how can i make the webexperiments pass flags for this call?

@jamesdaniels
Copy link
Collaborator

We copy over the npmrc, if one is present—can you resolve the conflict in that file?

@bmcbarron
Copy link

Years later, this issue pointed me in the right direction. For quick reference, adjacent to your package.json, place .npmrc with this line:

legacy-peer-deps = true

Obviously it's best to correct the issue in time and remove this setting, but it can help in the moment.

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

No branches or pull requests

3 participants