Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Error after following the guide: Cannot redefine property: tap #1

Closed
ststaynov opened this issue Apr 5, 2018 · 5 comments
Closed

Comments

@ststaynov
Copy link

ststaynov commented Apr 5, 2018

Using laravel-mix: "^2.1.11"
I couldn't find anything regarding this issue anywhere. Any thoughts? :)

.../node_modules/laravel-mix-auto-extract/node_modules/laravel-mix/src/helpers.js:21
Object.defineProperty(Array.prototype, 'tap', {
       ^

TypeError: Cannot redefine property: tap
    at Function.defineProperty (<anonymous>)
    at Object.<anonymous> (.../node_modules/laravel-mix-auto-extract/node_modules/laravel-mix/src/helpers.js:21:8)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (.../node_modules/laravel-mix-auto-extract/node_modules/laravel-mix/src/index.js:16:1)
@ankurk91
Copy link
Owner

ankurk91 commented Apr 5, 2018

@ststaynov
Can you share more info on how are you using this package?
May be share your webpack.mix.js.
I don't see this error on my machine.

Mean while can you also upgrade this package to v0.0.4.

@ststaynov
Copy link
Author

Hmm after updating to 0.4, deleting node_modules and installing and updating them the error seems to be gone. Thanks for the fast reply!

@ststaynov
Copy link
Author

P.S. Would you be extending the plugin to allow customization any time soon? :)

@ankurk91
Copy link
Owner

ankurk91 commented Apr 6, 2018

What kind of customisation you see in this?
Any recommendations?

@ststaynov
Copy link
Author

I would like to be able to extract the vendors of two different .js files to two different folders instead of it extracting the vendors of all the javascript files which I were previously compiled.

Something like this: webpack/webpack#4445

Maybe this is already possible in some way?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants