Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

"TypeError: Path must be a string. Received true" #152

Closed
@woubuc

Description

@woubuc

I'm just getting started with Rollup. When trying to import a .vue file, the plugin throws the following error:

[!] (vue plugin) TypeError: Path must be a string. Received true
src\js\ui\App.vue
TypeError: Path must be a string. Received true
    at error (H:\project\node_modules\rollup\dist\rollup.js:185:14)
    at Promise.resolve.then.catch.err (H:\project\node_modules\rollup\dist\rollup.js:17584:6)
    at <anonymous>

This is my rollup.config.js file:

import vue from 'rollup-plugin-vue';
import commonjs from 'rollup-plugin-commonjs';
import minify from 'rollup-plugin-babel-minify';
import resolve from 'rollup-plugin-node-resolve';

export default {
	name: 'aw',
	input: 'src/js/index.js',
	output: {
		format: 'iife',
		file: 'build/bundle.js'
	},

	plugins: [
		resolve({browser: true, preferBuiltins: false}),
		commonjs(),
		vue(),
		minify({comments: false})
	]
};

I'm running Rollup with: rollup --config --watch. Going by the error message and the fact that I didn't provide any config, I think it's an issue with the module or with Rollup.

I checked that Rollup and all plugins are the latest published version on npm with npm outdated.

In case it could be an error in my code, here's my src/js/index.js (literally just these two lines, I commented out everything else and the error kept occuring):

'use strict';

import App from './ui/App.vue';

And src/js/ui/App.vue:

<template>
	<h1>{{message}}</h1>
</template>

<script>
export default {
	data() { return {
		message: 'Hello world!'
	}}
}
</script>

<style scoped>
	h1 { color:red; }
</style>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions