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

The latest version of NPM is not compatible with @google/dscc scripts #253

Open
daannijkamp opened this issue Jun 23, 2021 · 3 comments
Open

Comments

@daannijkamp
Copy link

I have updated my NPM to the latest version (7.18.1). And now I can't run npm run update_production / dscc-scripts connector update_production anymore.
I get the following error message: Your package.json must have dsccConnector.production entry.
My package.json contains the correct values

"dsccConnector": {
    "production": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "latest": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  },

The reason for this is probably the "reduce lifecycle script environment".
npm_package_* environment variables (like npm_package_dsccConnector_production) are removed from the context of lifecycle scripts.

Solution
Downgrading my NPM

@raddevon
Copy link

Wanted to add some detail for anyone else running into this. Downgrading NPM worked for me too. I was on 7.15.0 and dropped back to 6.7.0. I did this by switching Node versions with NVM from 12.14.1 to 11.15.0. I'm guessing anything 12.x is broken and anything 11.x will work.

@MennoTammens
Copy link

Wanted to add some detail for anyone else running into this. Downgrading NPM worked for me too. I was on 7.15.0 and dropped back to 6.7.0. I did this by switching Node versions with NVM from 12.14.1 to 11.15.0. I'm guessing anything 12.x is broken and anything 11.x will work.

Node.js 12.x and 14.x come bundled with NPM 6.x, so downgrading Node.js isn't necessary.

@pacholoamit
Copy link

Yeah, ran into the same issue as well

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

4 participants