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

Unable to build storybook 6.5.14 using bamboo #23899

Closed
Hannah-goodridge opened this issue Aug 21, 2023 · 2 comments
Closed

Unable to build storybook 6.5.14 using bamboo #23899

Hannah-goodridge opened this issue Aug 21, 2023 · 2 comments

Comments

@Hannah-goodridge
Copy link

Hannah-goodridge commented Aug 21, 2023

Describe the bug

Error while trying to build storybook on bamboo:

ERR! ModuleNotFoundError: Module not found: Error: Can't resolve './keys' in '/home/bamboo/bamboo-agent-home/xml-data/build-dir/AR-LAN-STOR/source/node_modules/ramda/es'
error	18-Aug-2023 22:31:54	ERR! Did you mean 'keys.js'?
error	18-Aug-2023 22:31:54	ERR! BREAKING CHANGE: The request './keys' failed to resolve only because it was resolved as fully specified
error	18-Aug-2023 22:31:54	ERR! (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
error	18-Aug-2023 22:31:54	ERR! The extension in the request is mandatory for it to be fully specified.
error	18-Aug-2023 22:31:54	ERR! Add the extension to the request.
error	18-Aug-2023 22:31:54	ERR!     at /home/bamboo/bamboo-agent-home/xml-data/build-dir/AR-LAN-STOR/source/node_modules/webpack/lib/Compilation.js:2011:28
error	18-Aug-2023 22:31:54	ERR!     at /home/bamboo/bamboo-agent-home/xml-data/build-dir/AR-LAN-STOR/source/node_modules/webpack/lib/NormalModuleFactory.js:795:13
error	18-Aug-2023 22:31:54	ERR!     at eval (eval at create (/home/bamboo/bamboo-agent-home/xml-data/build-dir/AR-LAN-STOR/source/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:10:1)
error	18-Aug-2023 22:31:54	ERR!     at /home/bamboo/bamboo-agent-home/xml-data/build-dir/AR-LAN-STOR/source/node_modules/webpack/lib/NormalModuleFactory.js:275:22
error	18-Aug-2023 22:31:54	ERR!     at eval (eval at create (/home/bamboo/bamboo-agent-home/xml-data/build-dir/AR-LAN-STOR/source/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
error	18-Aug-2023 22:31:54	ERR!     at /home/bamboo/bamboo-agent-home/xml-data/build-dir/AR-LAN-STOR/source/node_modules/webpack/lib/NormalModuleFactory.js:431:22
error	18-Aug-2023 22:31:54	ERR!     at /home/bamboo/bamboo-agent-home/xml-data/build-dir/AR-LAN-STOR/source/node_modules/webpack/lib/NormalModuleFactory.js:124:11
error	18-Aug-2023 22:31:54	ERR!     at /home/bamboo/bamboo-agent-home/xml-data/build-dir/AR-LAN-STOR/source/node_modules/webpack/lib/NormalModuleFactory.js:667:25
error	18-Aug-2023 22:31:54	ERR!     at /home/bamboo/bamboo-agent-home/xml-data/build-dir/AR-LAN-STOR/source/node_modules/webpack/lib/NormalModuleFactory.js:852:8
error	18-Aug-2023 22:31:54	ERR!     at /home/bamboo/bamboo-agent-home/xml-data/build-dir/AR-LAN-STOR/source/node_modules/webpack/lib/NormalModuleFactory.js:972:5
error	18-Aug-2023 22:31:54	ERR!     at /home/bamboo/bamboo-agent-home/xml-data/build-dir/AR-LAN-STOR/source/node_modules/neo-async/async.js:6883:13
error	18-Aug-2023 22:31:54	ERR!     at /home/bamboo/bamboo-agent-home/xml-data/build-dir/AR-LAN-STOR/source/node_modules/webpack/lib/NormalModuleFactory.js:889:17
error	18-Aug-2023 22:31:54	ERR!     at finishResolved (/home/bamboo/bamboo-agent-home/xml-data/build-dir/AR-LAN-STOR/source/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:278:11)
error	18-Aug-2023 22:31:54	ERR!     at /home/bamboo/bamboo-agent-home/xml-data/build-dir/AR-LAN-STOR/source/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:342:25
error	18-Aug-2023 22:31:54	ERR!     at /home/bamboo/bamboo-agent-home/xml-data/build-dir/AR-LAN-STOR/source/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:409:24
error	18-Aug-2023 22:31:54	ERR!     at eval (eval at create (/home/bamboo/bamboo-agent-home/xml-data/build-dir/AR-LAN-STOR/source/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:12:1)

I'm using npm > 8 and roll up.

Here is the package.json:


{
    "name": "@mft/lantern",
    "engines": {
        "node": ">=16"
    },
    "version": "0.1.3",
    "author": "Moneyhub",
    "description": "Lantern is the Moneyhub design system",
    "license": "ISC",
    "repository": {
        "type": "git",
        "url": "git+ssh://[email protected]/yourwealth/mft-lantern.git"
    },
    "bugs": {
        "url": "https://bitbucket.org/yourwealth/mft-lantern/issues"
    },
    "homepage": "https://bitbucket.org/yourwealth/mft-lantern#readme",
    "main": "dist/index.js",
    "module": "dist/index.esm.js",
    "files": [
        "dist"
    ],
    "browser": {},
    "exports": {
        ".": {
            "browser": {
                "default": "./dist/index.esm.js"
            },
            "node": {
                "default": "./dist/index.js"
            }
        },
        "./theme-utils": {
            "browser": {
                "default": "./dist/theme-utils.esm.js"
            },
            "node": {
                "default": "./dist/theme-utils.js"
            }
        },
        "./theme-provider": {
            "browser": {
                "default": "./dist/theme-provider.esm.js"
            },
            "node": {
                "default": "./dist/theme-provider.js"
            }
        },
        "./global-styles": {
            "browser": {
                "default": "./dist/global-styles.esm.js"
            },
            "node": {
                "default": "./dist/global-styles.js"
            }
        },
        "./breakpoints": {
            "browser": {
                "default": "./dist/breakpoints.esm.js"
            },
            "node": {
                "default": "./dist/breakpoints.js"
            }
        }
    },
    "scripts": {
        "dev": "rollup -w -c ./config/rollup/dev.js",
        "build": "rm -rf ./dist; rollup -c ./config/rollup/prod.js",
        "lint": "eslint src/ config/",
        "prepublish": "npm run build",
        "storybook": "start-storybook -p 6006 --no-open",
        "build-storybook": "build-storybook",
        "test:watch": "jest --watch",
        "test": "jest"
    },
    "devDependencies": {
        "@babel/cli": "^7.18.10",
        "@babel/core": "^7.18.10",
        "@babel/preset-env": "^7.18.10",
        "@babel/preset-react": "^7.18.6",
        "@mft/eslint-config-momentumft": "^9.0.0",
        "@rollup/plugin-babel": "^5.3.1",
        "@rollup/plugin-commonjs": "^22.0.2",
        "@rollup/plugin-json": "^4.1.0",
        "@rollup/plugin-node-resolve": "^13.3.0",
        "@storybook/addon-actions": "^6.5.14",
        "@storybook/addon-docs": "^6.5.14",
        "@storybook/addon-essentials": "^6.5.14",
        "@storybook/addon-interactions": "^6.5.14",
        "@storybook/addon-links": "^6.5.14",
        "@storybook/builder-webpack4": "^6.5.14",
        "@storybook/builder-webpack5": "^6.5.14",
        "@storybook/manager-webpack4": "^6.5.14",
        "@storybook/manager-webpack5": "^6.5.14",
        "@storybook/react": "^6.5.14",
        "@storybook/testing-library": "^0.0.13",
        "@testing-library/jest-dom": "^5.16.5",
        "@testing-library/react": "^12.1.5",
        "@testing-library/user-event": "^14.4.3",
        "babel-jest": "^29.3.1",
        "babel-loader": "^8.2.5",
        "babel-plugin-module-resolver": "^4.1.0",
        "babel-plugin-styled-components": "^2.0.7",
        "color": "^4.2.3",
        "eslint": "^8.24.0",
        "eslint-config-prettier": "^8.5.0",
        "eslint-plugin-jest": "^27.0.4",
        "eslint-plugin-jsx-a11y": "^6.6.1",
        "eslint-plugin-prettier": "^4.2.1",
        "eslint-plugin-react": "^7.31.8",
        "eslint-plugin-react-hooks": "^4.6.0",
        "husky": "^8.0.1",
        "jest": "^29.5.0",
        "jest-environment-jsdom": "^29.3.1",
        "jest-styled-components": "^7.1.1",
        "lint-staged": "^13.0.3",
        "prettier": "^2.7.1",
        "rollup": "^2.77.3",
        "rollup-plugin-livereload": "^2.0.5",
        "rollup-plugin-peer-deps-external": "^2.2.4",
        "rollup-plugin-serve": "^2.0.0",
        "rollup-plugin-terser": "^7.0.2",
        "webpack": "^5.75.0"
    },
    "dependencies": {
        "facepaint": "^1.2.1",
        "ramda": "^0.29.0",
        "react-modal": "^3.15.1",
        "yup": "^0.32.11"
    },
    "peerDependencies": {
        "formik": ">= 2",
        "prop-types": ">= 15",
        "react": ">= 17",
        "react-dom": ">= 17",
        "styled-components": ">= 5"
    }
}

This issue is similar to #19927 and I wondered if this is too down to the enhanced resolve package.

To Reproduce

No response

System

Environment Info:

  System:
    OS: macOS 13.5.1
    CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
  Binaries:
    Node: 16.19.0 - ~/.nvm/versions/node/v16.19.0/bin/node
    npm: 8.19.3 - ~/.nvm/versions/node/v16.19.0/bin/npm
  Browsers:
    Chrome: 116.0.5845.96
    Safari: 16.6
  npmPackages:
    @storybook/addon-actions: ^6.5.14 => 6.5.16 
    @storybook/addon-docs: ^6.5.14 => 6.5.16 
    @storybook/addon-essentials: ^6.5.14 => 6.5.16 
    @storybook/addon-interactions: ^6.5.14 => 6.5.16 
    @storybook/addon-links: ^6.5.14 => 6.5.16 
    @storybook/builder-webpack4: ^6.5.14 => 6.5.16 
    @storybook/builder-webpack5: ^6.5.14 => 6.5.16 
    @storybook/manager-webpack4: ^6.5.14 => 6.5.16 
    @storybook/manager-webpack5: ^6.5.14 => 6.5.16 
    @storybook/react: ^6.5.14 => 6.5.16 
    @storybook/testing-library: ^0.0.13 => 0.0.13

Additional context

Note this doesn't happen locally I am able to build storybook successfully.
Bamboo environment has been set to use node 16 for all npm commands.

@Hannah-goodridge Hannah-goodridge changed the title [Bug]: Unable to build storybook 6.5.14 using bamboo Aug 21, 2023
@vanessayuenn
Copy link
Contributor

@Hannah-goodridge A lot has changed in Storybook since 7.0+! Would you mind upgrading and see if this issue persists? Thanks!!

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

No branches or pull requests

3 participants