-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Module not found: Error: Cannot resolve module 'pace' #328
Comments
+1 I'm running into this issue as well. Both |
Have you guys find a solution for this? |
+1 |
+1 Can't resolve 'pace' |
+1 |
I managed to get around this by running ie. installing pace explicitly into the root of the |
+1 The workaround proposed by @Jbarget works for me also. But I prefer a solution from the module authors |
of course, at the moment if you use my workaround you'll have 2 copies of |
@Jbarget Yeah, I also hope it will be temporary. By the way, isn't there a way to make 'pace' resolve to the nested pace module? Like using Webpack's alias or something like that. |
good point! im working on other functionality at the moment but will definitely revisit this |
@Jbarget I will also give it a look when I had a little more time |
The problem is that the AMD define(['pace'], function() {
return Pace;
}); (This defines a Correct define(function() {
return Pace;
}); |
To get around this until it's fixed, just disable amd for pace-progress:
this requires the imports loader for webpack: After that, you can just import it as usual: |
Sorry for not being involved in the discussion, but I just got this error today and it seems an easy enough fix
Hopefully I've not missed anything, sorry if I did, I'd love to know what so I don't make the mistake again. Anyone using https://github.com/bigcommerce/stencil, I'll be pushing a patch to that too |
Please see CodeByZach/pace#328 (comment) Without this patch I cannot get a clean build of stencil in [my Docker setup](https://gist.github.com/Lewiscowles1986/d4ef75a2d9c3e7d6e1794c3e90246c9a)
bump please |
I am still getting the issue in stencil |
Stencil has updated. Hubspot AFAIK has done nothing so you'll have to manually patch hubspot pace from my repo ATM |
Please see CodeByZach/pace#328 (comment) Without this patch I cannot get a clean build of stencil in [my Docker setup](https://gist.github.com/Lewiscowles1986/d4ef75a2d9c3e7d6e1794c3e90246c9a)
How can this still not be fixed? :( |
@yfilali
|
A quick fix is to fulfil it temporarily with: npm install --save-dev github:HubSpot/pace#v1.0.2 |
anyone managed to get this working in webpack 2? my code;
|
with webpack2 just need
|
Unfortunately this is still an issue, but @yozman fix works in webpack 3 as well. Is there a bigger fork we can point to, or can we discuss a 'pace' organization and get a few people on board ? |
Pace is such an amazing library could you please fix the loading part via Import? Thanks in advance. -Greg |
No hero willing to save the world here ! :( |
In my symfony webpack i use:
|
the @yozman solution works well for me with webpack ^3.11
|
Solve problem with "Module not found: Error: Can't resolve 'pace' in..." by CodeByZach#328 (comment)
thanks for publishing this as pace-js-amd-fix npm module |
thankyou @chebaby for the fix 👍 it worked for my situation (kotlin and webpack) |
Thanks for all the hints, guys!
|
I don't see this problem with webpack 5, maybe this issue can be closed? |
@glen-84 webpack encore is always on webpack 4 :S This workaround works for me :
// fix pace-js import
.addLoader({
test: require.resolve('pace-js'),
use: [{
loader: 'imports-loader',
options: {
additionalCode: 'var define = false;'
}
}]
})
|
|
Bug when I use it with webpack. Could you fix here https://www.npmjs.com/package/pace-progress ?
The text was updated successfully, but these errors were encountered: