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

Entry module not found: Error: Can't resolve 'respond.js' #51

Closed
chrisyue opened this issue Jun 22, 2017 · 7 comments
Closed

Entry module not found: Error: Can't resolve 'respond.js' #51

chrisyue opened this issue Jun 22, 2017 · 7 comments

Comments

@chrisyue
Copy link

I don't know if it's a issue related with encore or webpack,I am new to both.

this error occurs after I add

    .addEntry('for-ie', 'respond.js')

to webpack.config.js

there is no problem when I add some other other libs like html5shiv.

@stof
Copy link
Member

stof commented Jun 22, 2017

how have you installed respond.js ?

@weaverryan
Copy link
Member

weaverryan commented Jun 22, 2017

It looks like Respond.js doesn't advertise their main script properly: scottjehl/Respond#360

Try this instead:

    .addEntry('for-ie', 'respond.js/dest/respond.src.js')
``

This will look in the `node_modules/respond.js` directory, and then look for the `dest/response.src.js` file.

@stof
Copy link
Member

stof commented Jun 22, 2017

Yeah, I think Respond was just not meant to be installed through npm (they are not registered in npmjs.com either)

@chrisyue
Copy link
Author

respond.js/dest/respond.src.js is working , thank you guys.

but what does "I think Respond was just not meant to be installed through npm" means? what's going on if I install respond.js with yarn? should I use public cdn or some other way to include respond.js ?

@weaverryan
Copy link
Member

My best guess is that this library isn't well maintained (not many commits, no activity on issues or pull requests) - so that's why it doesn't play well with webpack. But, it's totally fine to use it as you are. It is published to the npm repository (that's why you were able to install it via yarn), but apparently even that was done by someone other than the author :).

@stof
Copy link
Member

stof commented Jun 23, 2017

hmm, indeed, it is on npmjs.com, but their search feature looks shitty as giving the exact package name in the search field does not provide it in the quick results (though it is the first result when forcing to go to the result page).

Anyway, giving that Respond is only useful for IE 8 and older (all newer browsers support media queries), the fact that the library is not active anymore does not surprise me.

@weaverryan
Copy link
Member

I've just added a FAQ about this: symfony/symfony-docs#8084

Cheers!

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

3 participants