bhj / KaraokeEternal

Open karaoke party system
https://www.karaoke-eternal.com
ISC License
460 stars 70 forks source link

[Windows] NPM Build Error #48

Closed vinaykapadia closed 2 years ago

vinaykapadia commented 2 years ago

I get this error when trying to build. I'm not very familiar with node so I'm not sure how to fix this. I cloned the repo, ran npm install and then npm run build and I get the output below. Any thoughts?

PS D:\ws\karaoke-forever> npm run build

> karaoke-forever@0.0.0-dev.0 build D:\ws\karaoke-forever
> rimraf build && webpack --config config/webpack.config.js

14 assets
1271 modules

WARNING in license-webpack-plugin: could not find any license file for react-flip-toolkit. Use the licenseTextOverrides option to add the license text if desired.

WARNING in license-webpack-plugin: could not find any license file for flip-toolkit. Use the licenseTextOverrides option to add the license text if desired.

WARNING in license-webpack-plugin: could not find any license file for react-responsive-modal. Use the licenseTextOverrides option to add the license text if desired.

WARNING in license-webpack-plugin: could not find any license file for redux-throttle. Use the licenseTextOverrides option to add the license text if desired.

WARNING in license-webpack-plugin: could not find any license type for socket.io-client in its package.json

WARNING in license-webpack-plugin: could not find any license file for socket.io-client. Use the licenseTextOverrides option to add the license text if desired.

ERROR in   HookWebpackError: ENOENT: no such file or directory, scandir

  - HookWebpackError.js:48 makeWebpackError
    [karaoke-forever]/[webpack]/lib/HookWebpackError.js:48:9

  - Compilation.js:3060
    [karaoke-forever]/[webpack]/lib/Compilation.js:3060:12

  - Compilation.js:480 fn
    [karaoke-forever]/[webpack]/lib/Compilation.js:480:17

  - task_queues.js:95 processTicksAndRejections
    internal/process/task_queues.js:95:5

  - -- inner error --

  - Error: ENOENT: no such file or directory, scandir

  - CachedInputFileSystem.js:233 CacheBackend.provideSync
    [karaoke-forever]/[enhanced-resolve]/lib/CachedInputFileSystem.js:233:32

  - WebpackFileSystem.js:78 WebpackFileSystem.listPaths
    [karaoke-forever]/[license-webpack-plugin]/dist/WebpackFileSystem.js:78:24

  - LicenseTextReader.js:37 LicenseTextReader.readLicense
    [karaoke-forever]/[license-webpack-plugin]/dist/LicenseTextReader.js:37:54

  - PluginChunkReadHandler.js:71 PluginChunkReadHandler.processModule
    [karaoke-forever]/[license-webpack-plugin]/dist/PluginChunkReadHandler.js:71:62

  - PluginChunkReadHandler.js:24
    [karaoke-forever]/[license-webpack-plugin]/dist/PluginChunkReadHandler.js:24:27

  - WebpackInnerModuleIterator.js:39 WebpackInnerModuleIterator.internalCallback
    [karaoke-forever]/[license-webpack-plugin]/dist/WebpackInnerModuleIterator.js:39:13

  - WebpackInnerModuleIterator.js:21 WebpackInnerModuleIterator.iterateModules
    [karaoke-forever]/[license-webpack-plugin]/dist/WebpackInnerModuleIterator.js:21:9

  - PluginChunkReadHandler.js:20
    [karaoke-forever]/[license-webpack-plugin]/dist/PluginChunkReadHandler.js:20:39

  - WebpackChunkModuleIterator.js:42 WebpackChunkModuleIterator.iterateModules
    [karaoke-forever]/[license-webpack-plugin]/dist/WebpackChunkModuleIterator.js:42:21

webpack 5.72.0 compiled with 1 error and 6 warnings in 16841 ms
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! karaoke-forever@0.0.0-dev.0 build: `rimraf build && webpack --config config/webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the karaoke-forever@0.0.0-dev.0 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!     C:\Users\user\AppData\Roaming\npm-cache\_logs\2022-05-16T23_45_36_816Z-debug.log
bhj commented 2 years ago

Yes, this seems to be an issue on Windows. I don't use it for development and couldn't track it down in a limited amount of time, but let's see if anyone else has some insight.

vinaykapadia commented 2 years ago

Ah cool. I'll give it a try on Linux.

vinaykapadia commented 2 years ago

I tried it on Linux, worked fine.

bhj commented 2 years ago

Thanks for confirming. Since it should work in WSL, going ahead and closing for now. Hopefully, whatever the issue is, it'll be fixed upstream.

vinaykapadia commented 2 years ago

Just verified, it does work in WSL. Thanks!

laberning commented 2 months ago

I just ran into this issue while building on Windows and did a bit of investigation:

It is caused by a problem in the License Webpack Plugin: https://github.com/xz64/license-webpack-plugin/issues/124#issuecomment-1189573682

I can confirm that building Karaoke Eternal works fine on Windows, if I include the following exclude to the webpack.license.config.js:

    excludedPackageTest: (packageName) => {
      return (packageName === "karaoke-eternal");
    },