adobe / storefront-search-as-you-type

4 stars 8 forks source link

Cannot run NPM install (non Adobe employee) - 401 Unauthorized #2

Open mpchadwick opened 8 months ago

mpchadwick commented 8 months ago

Expected Behaviour

I can run an npm install to use this project

Actual Behaviour

npm ERR! 401 Unauthorized - GET https://adobe.trust-adobe.console.banyanops.com/v2/auth?client_id=REDACTED&nonce=REDACTED&redirect_uri=https%3A%2F%2Fartifactory.corp.adobe.com%2Fbnn_trust_cb&response_type=code&scope=openid+profile+email&state=REDACTED

I've redacted the client_id, nonce and state as I'm not sure if they are sensitive or not

Reproduce Scenario (including but not limited to)

Run npm install

Steps to Reproduce

Run npm install

Platform and Version

main branch of this project

Sample Code that illustrates the problem

npm install

Logs taken while reproducing problem

npm ERR! 401 Unauthorized - GET https://adobe.trust-adobe.console.banyanops.com/v2/auth?client_id=REDACTED&nonce=REDACTED&redirect_uri=https%3A%2F%2Fartifactory.corp.adobe.com%2Fbnn_trust_cb&response_type=code&scope=openid+profile+email&state=REDACTED

mpchadwick commented 8 months ago

It seems it works with these versions

npm -version 6.14.8

node v14.15.1

It DOESN'T work with these

node: v18.12.1 npm: 8.19.2

ludcl commented 7 months ago

To make it work, I removed every "node_modules*" node from package-lock.json, keeping only this content:

{
    "name": "storefront-search-as-you-type",
    "version": "0.3.14",
    "lockfileVersion": 3,
    "requires": true,
    "packages": {
        "": {
            "name": "storefront-search-as-you-type",
            "version": "0.3.14",
            "license": "MIT",
            "dependencies": {
                "currency-symbol-map": "^5.1.0",
                "preact": "^10.18.1",
                "uuid": "^9.0.1"
            },
            "devDependencies": {
                "@adobe/magento-storefront-events-sdk": "^1.5.4",
                "@testing-library/jest-dom": "^5.17.0",
                "@testing-library/react": "^13.4.0",
                "@types/jest": "^29.5.6",
                "@types/prettier": "^2.7.3",
                "@types/react": "^18.2.31",
                "@types/react-dom": "^18.2.14",
                "@types/styled-components": "^5.1.29",
                "@types/uuid": "^9.0.6",
                "@typescript-eslint/eslint-plugin": "^5.62.0",
                "@typescript-eslint/parser": "^5.62.0",
                "clean-webpack-plugin": "^4.0.0",
                "css-loader": "^6.8.1",
                "currency-symbol-map": "^5.1.0",
                "eslint": "^8.52.0",
                "eslint-config-prettier": "^8.10.0",
                "eslint-plugin-jest": "^27.4.3",
                "eslint-plugin-jsx-a11y": "^6.7.1",
                "eslint-plugin-prettier": "^4.2.1",
                "eslint-plugin-react": "^7.33.2",
                "eslint-plugin-simple-import-sort": "^10.0.0",
                "fork-ts-checker-webpack-plugin": "^9.0.2",
                "html-webpack-plugin": "^5.5.3",
                "identity-obj-proxy": "^3.0.0",
                "jest": "^29.7.0",
                "jest-environment-jsdom": "^29.7.0",
                "jest-styled-components": "^7.2.0",
                "lint-staged": "^13.3.0",
                "mini-css-extract-plugin": "^2.7.6",
                "preact-svg-loader": "^0.2.1",
                "prettier": "^2.8.8",
                "react-refresh-typescript": "^2.0.9",
                "source-map-loader": "^4.0.1",
                "style-loader": "^3.3.3",
                "styled-components": "^5.3.11",
                "terser-webpack-plugin": "^5.3.9",
                "ts-jest": "^29.1.1",
                "ts-loader": "^9.5.0",
                "typescript": "^5.2.2",
                "typescript-plugin-styled-components": "^3.0.0",
                "url-loader": "^4.1.1",
                "webpack": "^5.89.0",
                "webpack-bundle-analyzer": "^4.9.1",
                "webpack-cli": "^5.1.4",
                "webpack-dev-server": "^4.15.1",
                "webpack-merge": "^5.10.0"
            },
            "engines": {
                "node": ">=18.0.0",
                "npm": ">=10.0.0"
            }
        }
    }
}