馃悰 bug report
While trying to alias vue to use the full build instead of the runtime build only parcel keeps on installing vue and never stops.
{
"presets": ["env"]
}
"name": "vue-reproduce",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"dev": "parcel index.html"
},
"devDependencies": {
"parcel-bundler": "^1.7.1"
},
"alias": {
"vue": "vue/dist/vue.common.js"
},
"dependencies": {
"vue": "^2.5.16"
}
The alias should reference the already installed vue instead of trying to install a new copy
The installation of vue is recursive and never completes.
| Software | Version(s) |
| ---------------- | ---------- |
| Parcel |1.7.1
| Node |v9.8.0
| npm/Yarn |1.5.1
| Operating System | Windows 10
If it's a folder it should be ./vue/dist/vue.common.js, otherwise it should work if it's an installed npm module.
If it's the latter than it's probably an auto-install bug.
cc @davidnagli
It is an npm installed module
You can currently work around it by using the following cli flag: --no-autoinstall
@sadick254 The workaround of --no-autoinstall by @DeMoorJasper prevents the recursive installation but now I get a new error: Cannot resolve dependency 'vue' in my main.js file. Any ideas?
@dakshshah96 i鈥檓 not sure but it appears to be a bug with the resolver, more specifically with the aliases when used with node_module/...
Sent with GitHawk
The way I work around the recursive install currently is pointing the alias to the node_modules that way I dont have to disable the autoinstall feature
"alias": {
"vue": "./node_modules/vue/dist/vue.common.js"
}
@sadick254 Thanks for the tip!
Now my build succeeds even with autoinstall on but I get the following error in my console:
[Vue warn]: Failed to mount component: template or render function not defined.
found in
---> <Anonymous>
<Adminapp>
<Root>
warn @ vue.common.js:593
Should be fixed (at least the install part)