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

Build error when using Parcel v1.5.0 #1

Open
ghost opened this issue Jan 26, 2018 · 2 comments
Open

Build error when using Parcel v1.5.0 #1

ghost opened this issue Jan 26, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Jan 26, 2018

Hello there.

Thanks for putting together this boilerplate.

After playing around with it, I noticed that upgrading the parcel-bundler dependency to 1.5.0 breaks the build. Specifically, I get this error trace:

$ npm run dev

> [email protected] dev D:\Code\forks\parcel-vue-ts
> parcel serve src/index.html -d dist --public-url /dist/ -o

Server running at http://localhost:1234
×  D:\Code\forks\parcel-vue-ts\src\app.vue: Path must be a string. Received undefined
    at assertPath (path.js:28:11)
    at Object.relative (path.js:571:5)
    at new Asset (D:\Code\forks\parcel-vue-ts\node_modules\parcel-bundler\src\Asset.js:22:30)
    at new JSAsset (D:\Code\forks\parcel-vue-ts\node_modules\parcel-bundler\src\assets\JSAsset.js:23:5)
    at new TypeScriptAsset (D:\Code\forks\parcel-vue-ts\node_modules\parcel-bundler\src\assets\TypeScriptAsset.js:4:1)
    at ts (D:\Code\forks\parcel-vue-ts\vue.config.js:7:22)
    at D:\Code\forks\parcel-vue-ts\node_modules\vueify-bolt\lib\compiler.js:297:7
    at new Promise (<anonymous>)
    at compileAsPromise (D:\Code\forks\parcel-vue-ts\node_modules\vueify-bolt\lib\compiler.js:296:12)
    at processScript (D:\Code\forks\parcel-vue-ts\node_modules\vueify-bolt\lib\compiler.js:251:10)
(node:1544) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Path must be a string. Received undefined
(node:1544) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:1544) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): TypeError: Cannot read property 'line' of undefined
(node:1544) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): TypeError: Cannot read property 'line' of undefined

Any ideas?

@masonz
Copy link
Owner

masonz commented Feb 1, 2018

HMM.. I tried to remove code splitting from the router, and it worked in parcel-bundler 1.5.x.

// router/index.ts

import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

import essential from '../components/essential/essential.vue'
import ecosystem from '../components/ecosystem/ecosystem.vue'

const routes = [
  {
    name: 'essential',
    path: '/essential',
    component: essential
  },
  {
    name: 'ecosystem',
    path: '/ecosystem',
    component: ecosystem
  },
  { path: '*', redirect: '' }
]

export default new Router({ routes })

But I'm not sure if it's a parcel problem.

@masonz
Copy link
Owner

masonz commented Feb 27, 2018

@miqid This problem is solved in BoltDoggy/parcel-plugin-vue#25. This issue will be close at the next release of the parcel-plugin-vue.

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