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

External JS libraby - requires jQuery dependency #234

Closed
pwasiewicz opened this issue Apr 23, 2019 · 0 comments
Closed

External JS libraby - requires jQuery dependency #234

pwasiewicz opened this issue Apr 23, 2019 · 0 comments

Comments

@pwasiewicz
Copy link

I have an external library that tries to load jQeury:

	if ( typeof define === "function" && define.amd ) {
		define( ["jquery"], factory );
	} else if (typeof module === "object" && module.exports) {
		module.exports = factory( require( "jquery" ) );
	} else {
		factory( jQuery );
	}

The problem is that calling require("jquery") causes an error:

Uncaught Error: Cannot find module 'jquery'
at Module._resolveFilename (internal/modules/cjs/loader.js:602)
at Function.Module._resolveFilename (E:\vs\Pshare\PShare.Front.Desktop\obj\Host\node_modules\electron\dist\resources\electron.asar\common\reset-search-paths.js:35)
at Function.Module._load (internal/modules/cjs/loader.js:528)
at Module.require (internal/modules/cjs/loader.js:658)
at require (internal/modules/cjs/helpers.js:20)
at jquery.validate.min.js:4
at jquery.validate.min.js:4

Where can I add module 'jQuery' to make it work?

@pwasiewicz pwasiewicz changed the title External JS librarby - require dependency External JS libraby - requires jQuery dependency Apr 23, 2019
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

1 participant