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

npm install failing due to webpack dependency issues #12

Open
noemide opened this issue Jan 25, 2021 · 5 comments
Open

npm install failing due to webpack dependency issues #12

noemide opened this issue Jan 25, 2021 · 5 comments

Comments

@noemide
Copy link

noemide commented Jan 25, 2021

How to reproduce: Clone repo an run 'npm install' .

Build starts fine but eventually runs into error (below). I tried to fix it by manually installing webpack-cli but that unfortunaltly lead to a whole new series of dependency problems seemingly having to do with breaking changes between different versions of webpack.

Error log:

Hash: 275a5cf5779a3513888b
Version: webpack 2.7.0
Time: 24709ms
                              Asset       Size  Chunks                    Chunk Names
                           index.js     156 kB       0  [emitted]         index
                         commons.js     577 kB       1  [emitted]  [big]  vendor
  index.js.275a5cf5779a3513888b.map     851 kB       0  [emitted]         index
commons.js.275a5cf5779a3513888b.map    4.57 MB       1  [emitted]         vendor
                      ..\index.html  938 bytes          [emitted]
Webpack Bundle Analyzer saved report to [...]\patient-browser\build\js\report.html
The CLI moved into a separate package: webpack-cli
Please install 'webpack-cli' in addition to webpack itself to use the CLI
-> When using npm: npm i -D webpack-cli
-> When using yarn: yarn add -D webpack-cli
internal/modules/cjs/loader.js:796
    throw err;
    ^

Error: Cannot find module 'webpack-cli/bin/config-yargs'
Require stack:
- [...]\patient-browser\node_modules\webpack-dev-server\bin\webpack-dev-server.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)
    at Function.Module._load (internal/modules/cjs/loader.js:686:27)
    at Module.require (internal/modules/cjs/loader.js:848:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> ([...]\patient-browser\node_modules\webpack-dev-server\bin\webpack-dev-server.js:84:1)
    at Module._compile (internal/modules/cjs/loader.js:955:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
    at Module.load (internal/modules/cjs/loader.js:811:32)
    at Function.Module._load (internal/modules/cjs/loader.js:723:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1043:10) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '[...]\\patient-browser\\node_modules\\webpack-dev-server\\bin\\webpack-dev-server.js'
  ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build:dev: `npm run clean && webpack --hide-modules && webpack-dev-server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build:dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     [...]\AppData\Roaming\npm-cache\_logs\2021-01-25T16_11_04_194Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `if-env NODE_ENV=production && npm run build:prod || npm run build:dev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     [...]\AppData\Roaming\npm-cache\_logs\2021-01-25T16_11_04_254Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     [...]\AppData\Roaming\npm-cache\_logs\2021-01-25T16_11_04_351Z-debug.log
@mobilars
Copy link

I have same problem. Pity, since it'd be really cool to build on.

@JasonNguyen1999
Copy link

I also have the same problem. I don't know how to fix it, can you give me idea? Thanks very much.

@noemide
Copy link
Author

noemide commented Aug 5, 2022

I also have the same problem. I don't know how to fix it, can you give me idea? Thanks very much.

I ended up using this fork https://github.com/joundso/patient-browser which was still working when i tried it (about a year ago)...

@JasonNguyen1999
Copy link

JasonNguyen1999 commented Aug 8, 2022

I also have the same problem. I don't know how to fix it, can you give me idea? Thanks very much.

I ended up using this fork https://github.com/joundso/patient-browser which was still working wen i tried it (about a year ago)...

Yeah, it looks good. I found the reason the build failed because the old Webpack version was no longer relevant, just updated it and it worked fine. Thanks for your answer.

@Dtphelan1
Copy link
Collaborator

To those who have had issue with this tool in the past: we recently updated our build structure dramatically, switching from webpack to vite. As a result, I expect this issue has been addressed. If anyone would care to confirm this on their end, it would be much appreciated.

Since I suspect this is resolved, in an effort to keep our issue backlog fresh we'll close this issue after 30 more days of inactivity. Of course, if that happens and you're still seeing issues on your end, please feel free to re-open it or create a similar one! In the meantime, thank you all for your comments and contributions.

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