dotenv-webpack missing
See original GitHub issueI upgraded to the latest @storybook/core and @storybook/react and now get:
info @storybook/react v5.2.0-beta.19
info
info => Loading static files from: /Users/cyber/dev/jb/qc/qc-frontend/public .
info => Loading presets
WARN Failed to load preset: "/Users/cyber/dev/jb/qc/qc-frontend/node_modules/@storybook/react/node_modules/@storybook/core/dist/server/manager/manager-preset.js"
ERR! Error: Cannot find module 'dotenv-webpack'
ERR! Require stack:
ERR! - /Users/cyber/dev/jb/qc/qc-frontend/node_modules/@storybook/react/node_modules/@storybook/core/dist/server/manager/manager-webpack.config.js
ERR! - /Users/cyber/dev/jb/qc/qc-frontend/node_modules/@storybook/react/node_modules/@storybook/core/dist/server/manager/manager-preset.js
ERR! - /Users/cyber/dev/jb/qc/qc-frontend/node_modules/@storybook/react/node_modules/@storybook/core/dist/server/presets.js
ERR! - /Users/cyber/dev/jb/qc/qc-frontend/node_modules/@storybook/react/node_modules/@storybook/core/dist/server/config.js
ERR! - /Users/cyber/dev/jb/qc/qc-frontend/node_modules/@storybook/react/node_modules/@storybook/core/dist/server/build-static.js
ERR! - /Users/cyber/dev/jb/qc/qc-frontend/node_modules/@storybook/react/node_modules/@storybook/core/server.js
ERR! - /Users/cyber/dev/jb/qc/qc-frontend/node_modules/@storybook/react/dist/server/index.js
ERR! - /Users/cyber/dev/jb/qc/qc-frontend/node_modules/@storybook/react/bin/index.js
ERR! at Function.Module._resolveFilename (internal/modules/cjs/loader.js:625:15)
ERR! at Function.Module._load (internal/modules/cjs/loader.js:527:27)
ERR! at Module.require (internal/modules/cjs/loader.js:683:19)
ERR! at require (internal/modules/cjs/helpers.js:16:16)
ERR! at Object.<anonymous> (/Users/cyber/dev/jb/qc/qc-frontend/node_modules/@storybook/react/node_modules/@storybook/core/dist/server/manager/manager-webpack.config.js:14:45)
ERR! at Module._compile (internal/modules/cjs/loader.js:776:30)
ERR! at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
ERR! at Module.load (internal/modules/cjs/loader.js:643:32)
ERR! at Function.Module._load (internal/modules/cjs/loader.js:556:12)
ERR! at Module.require (internal/modules/cjs/loader.js:683:19)
ERR! at require (internal/modules/cjs/helpers.js:16:16)
ERR! at Object.<anonymous> (/Users/cyber/dev/jb/qc/qc-frontend/node_modules/@storybook/react/node_modules/@storybook/core/dist/server/manager/manager-preset.js:21:46)
ERR! at Module._compile (internal/modules/cjs/loader.js:776:30)
ERR! at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
ERR! at Module.load (internal/modules/cjs/loader.js:643:32)
ERR! at Function.Module._load (internal/modules/cjs/loader.js:556:12)
ERR! Error: Cannot find module 'dotenv-webpack'
Issue Analytics
- State:
- Created 4 years ago
- Comments:19 (5 by maintainers)
Top Results From Across the Web
Fails if variable is not defined or .env file is missing · Issue #229
The Dotenv constructor returns something like the following object. This works great when using these defined variables such as process.env.
Read more >Unable to access process.env variables with dotenv-webpack
I'm trying to access my .env file variables using dotenv-webpack so that they can be bundled later and I can use them on...
Read more >dotenv-webpack - npm
A simple webpack plugin to support dotenv.. Latest version: 8.0.1, last published: 4 months ago. Start using dotenv-webpack in your project ...
Read more >Using environment variables with Webpack - Prateek Surana
A guide for setting up and using environment variables with Webpack and handling different values for Production and Development ...
Read more >Cannot find module 'dotenv' error in Node.js | bobbyhadz
To solve the error "Cannot find module 'dotenv'", make sure to install the dotenv package by opening your terminal in your project's root...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@futbolsalas15 if you can provide a clean reproduction repo, I can take a look.
I suspect it’s a lockfile issue, try removing all lockfiles, node_modules and re-installing. See if it works then.
Hi!
It seems the error persists even with version 6.0.22
I’ve tried to install the required package, but it seems to continue requiring more packages.
Analyzing the content of
@storybook/core
folder inside node_modules, it seems that it has its own version of node_modules, where the package is available. Maybe it is an error where the localnode_modules
inside@storybook/core
isn’t being included in the build process?