emulsify-ds / emulsify-drupal

Drupal theme built with Storybook and Webpack
GNU General Public License v2.0
92 stars 42 forks source link

(From Drupal.org) npm run storybook blocked by "Cannot find module 'react/package.json'" #266

Open amazingrando opened 2 years ago

amazingrando commented 2 years ago

Original issue from Drupal.org: https://www.drupal.org/project/emulsify_drupal/issues/3275004


Following the installation doc guide at: https://docs.emulsify.info/emulsify-drupal/emulsify-drupal

(with lando configuration at https://docs.emulsify.info/emulsify-drupal/emulsify-drupal/advanced-usage/lando-environments)

I cannot run npm run storybook. And this is the message I got:

Failed to load preset: "/PROJECT_NAME/web/themes/custom/THEME_NAME/node_modules/@storybook/core/node_modules/@storybook/manager-webpack4/dist/cjs/presets/manager-preset.js"
ERR! Error: Cannot find module 'react/package.json'
ERR! Require stack:
ERR! - /PROJECT_NAME/web/themes/custom/THEME_NAME/node_modules/@storybook/core/node_modules/@storybook/ui/noop.js
ERR!     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
....

While I clone the repo from https://github.com/emulsify-ds/compound/tree/1.1.0

And npm run develop

aimevp commented 1 year ago

I ran into the same issue trying to get the emulsify cli working in lando...