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

'makeWebpackPkg' errored... Error in plugin 'webpack-stream', modules not found #4120

Closed
tornajoe opened this issue Aug 27, 2019 · 8 comments · Fixed by #4124
Closed

'makeWebpackPkg' errored... Error in plugin 'webpack-stream', modules not found #4120

tornajoe opened this issue Aug 27, 2019 · 8 comments · Fixed by #4124

Comments

@tornajoe
Copy link

Type of issue

Bug/build failure

Description

When I go to build a prebid.js file from mac terminal using gulp build --modules=/path_to_file/pbModules.json I get a very long error that starts with an error in the makeWebpackPkg and webpack-stream plugins

[10:30:52] Using gulpfile ~/Desktop/Prebid.js/gulpfile.js
[10:30:52] Starting 'build'...
[10:30:52] Starting 'clean'...
[10:30:52] Finished 'clean' after 21 ms
[10:30:52] Starting 'build-bundle-prod'...
[10:30:52] Starting 'makeWebpackPkg'...
[10:31:44] 'makeWebpackPkg' errored after 52 s
[10:31:44] Error in plugin 'webpack-stream'

Steps to reproduce

The last time I used terminal to build prebid was 2018 when my download was version 1.25.
I typed git pull to update all the files and received 2.30 as the new version in the files.
Then after typing the command gulp build --modules=/path_to_file/pbModules.json, that's when I get these errors.

I also tried redownloading the files before I did git pull and this same thing happened.

Platform details

2015 Macbook Pro, 10.14.5

Actual results

Here's only the start of the error output since a lot of it repeats and there's quite a lot of it. It mentions a number of modules are not found in directories that don't exist, nor that I see as downloadable on the git homepage for prebid.

	./node_modules/destroy/index.js
Module not found: Error: Can't resolve 'fs' in '/Users/admin/Desktop/Prebid.js/node_modules/destroy'
resolve 'fs' in '/Users/admin/Desktop/Prebid.js/node_modules/destroy'
	Parsed request is a module
	using description file: /Users/admin/Desktop/Prebid.js/node_modules/destroy/package.json (relative path: .)
		Field 'browser' doesn't contain a valid alias configuration
	after using description file: /Users/admin/Desktop/Prebid.js/node_modules/destroy/package.json (relative path: .)
		resolve as module
			looking for modules in /Users/admin/Desktop/Prebid.js
				using description file: /Users/admin/Desktop/Prebid.js/package.json (relative path: .)
					Field 'browser' doesn't contain a valid alias configuration
				after using description file: /Users/admin/Desktop/Prebid.js/package.json (relative path: .)
					using description file: /Users/admin/Desktop/Prebid.js/package.json (relative path: ./fs)
						no extension
							Field 'browser' doesn't contain a valid alias configuration
							/Users/admin/Desktop/Prebid.js/fs doesn't exist
						.js
							Field 'browser' doesn't contain a valid alias configuration
							/Users/admin/Desktop/Prebid.js/fs.js doesn't exist
						.json
							Field 'browser' doesn't contain a valid alias configuration
							/Users/admin/Desktop/Prebid.js/fs.json doesn't exist
						as directory
							/Users/admin/Desktop/Prebid.js/fs doesn't exist
			/Users/admin/Desktop/Prebid.js/node_modules/destroy/node_modules doesn't exist or is not a directory
			/Users/admin/Desktop/Prebid.js/node_modules/node_modules doesn't exist or is not a directory
			/Users/admin/Desktop/node_modules doesn't exist or is not a directory
			/Users/admin/node_modules doesn't exist or is not a directory
			/Users/node_modules doesn't exist or is not a directory
			/node_modules doesn't exist or is not a directory
			looking for modules in /Users/admin/Desktop/Prebid.js/node_modules
				using description file: /Users/admin/Desktop/Prebid.js/package.json (relative path: ./node_modules)
					Field 'browser' doesn't contain a valid alias configuration
				after using description file: /Users/admin/Desktop/Prebid.js/package.json (relative path: ./node_modules)
					using description file: /Users/admin/Desktop/Prebid.js/package.json (relative path: ./node_modules/fs)
						no extension
							Field 'browser' doesn't contain a valid alias configuration
							/Users/admin/Desktop/Prebid.js/node_modules/fs doesn't exist
						.js
							Field 'browser' doesn't contain a valid alias configuration
							/Users/admin/Desktop/Prebid.js/node_modules/fs.js doesn't exist
						.json
							Field 'browser' doesn't contain a valid alias configuration
							/Users/admin/Desktop/Prebid.js/node_modules/fs.json doesn't exist
						as directory
							/Users/admin/Desktop/Prebid.js/node_modules/fs doesn't exist```
@jsnellbaker
Copy link
Collaborator

Hi @tornajoe

Did you clear out your project's node_modules folder after downloading all the updates from Prebid 2.x (via your git pull)? If not, can you try to remove that folder and rerun npm install to download all the dependencies, and then try to run the build again?

There were a number of package updates/changes between the various releases, and this problem sounds like it may just be some of those packages are missing and should clear up once everything is reinstalled.

@tornajoe
Copy link
Author

Hi @jsnellbaker,
I did not remove the node_modules folder after updating via git pull.
I just now went in and manually deleted the node_modules folder, then went back into the Prebid.js directory in terminal and typed npm install. That worked fine but when I went to build using gulp build --modules= like before, I got the exact same long error as before.

@jsnellbaker
Copy link
Collaborator

@tornajoe Thanks for the update and giving that suggestion a try.

Can you share a copy of the pbModules.json file so I can try it on my end?

@tornajoe
Copy link
Author

tornajoe commented Aug 27, 2019

Sure thing. @jsnellbaker

[ "33acrossBidAdapter", "aolBidAdapter", "appnexusBidAdapter", "audienceNetworkBidAdapter", "conversantBidAdapter", "criteoBidAdapter", "districtmBidAdapter", "districtmDMXBidAdapter", "gumgumBidAdapter", "ixBidAdapter", "justPremiumBidAdapter", "lockerdomeBidAdapter", "openxBidAdapter", "prebidServerBidAdapter", "pubmaticBidAdapter", "rubiconBidAdapter", "sharethroughBidAdapter", "sonobiBidAdapter", "sovrnBidAdapter", "sublimeBidAdapter", "teadsBidAdapter", "tripleliftBidAdapter", "undertoneBidAdapter", "yieldmoBidAdapter", "googleAnalyticsAdapter", "consentManagement", "currency", "express", "dfpAdServerVideo", "pubCommonId", "s2sTesting" ]

@jsnellbaker
Copy link
Collaborator

Hi @tornajoe

Few notes in the interim:

  • districtmBidAdapter is not an actual file. The districtm bidder is just an alias of the appnexusBidAdapter, so you don't need to include it in this module list since you already have the appnexusBidAdapter file included.
  • justPremiumBidAdapter should be justpremiumBidAdapter

The main issue though seems to be with the express module. Still investigating into that part.

@tornajoe
Copy link
Author

Good morning @jsnellbaker!

DistrictM was confusing to me because on the prebid.org/download page, you can select both districtM and districtmDMX. But I also knew when I looked at the folder with the modules, only districtmDMXBidAdapter showed up. So thank you for clarifying as to why that is. I've also corrected the just premium error.

Thank you for you continued assistance into this and the express module.

Joe

@tornajoe
Copy link
Author

@jsnellbaker I read the pull request about this and made changes based off of that but the problem still persists (the same exact errors coming back). I tried again starting fresh, doing a git pull, and the other steps you mentioned earlier.

I'll revisit this in a bit, but for right now, I was able to download off of prebid.org/download since the new partner I was trying to add is now available through there, and downloading from there has worked successfully.

@jsnellbaker
Copy link
Collaborator

Hi @tornajoe

Can you clarify - did you pull my PR directly or just replicate the changes on your end?

In either case - did you also verify the node environment (at least 8.9) and reinstall the project dependencies?

I've tried the build command with the list of modules you were using (both as a list in the build command and as a .json file), and it successfully creates the build for me with the changes in the PR. Please let me know.

Thanks!

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

Successfully merging a pull request may close this issue.

2 participants