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

Unable to load pug-runtime #15

Open
ghost opened this issue Apr 18, 2019 · 5 comments
Open

Unable to load pug-runtime #15

ghost opened this issue Apr 18, 2019 · 5 comments

Comments

@ghost
Copy link

ghost commented Apr 18, 2019

I'm attempting to use this plugin, but receive this error when I try to compile:

[!] Error: Could not load pug-runtime (imported by /home/gabe/Coding/notify/src/dom/pug/message-container.pug): The argument 'path' must be a string or Uint8Array without null bytes. Received '\u0000pug-runtime'

Here's the gist of my code, for reference:

// rollup.config.js
import pug from 'rollup-plugin-pug';

export default {
  plugins: [
    pug()
  }
};
// somefile.pug
div(class='my-class')
// index.js
import somefile from './somefile.pug';

I'm not passing any parameters into the pug plugin, and so I'm not sure what's going wrong.

@ghost
Copy link
Author

ghost commented Apr 19, 2019

Just a follow-up:

I tweaked my rollup.config.js, passing { pugRuntime: 'pug-runtime' } into the pug() call in the plugins array, and manually installed pug-runtime as a dependency. This got the code to compile. I'm far from an expert but it seems like a null character is getting thrown in to the default pugRuntime parameter (hence the '\u0000pug-runtime' in the error).

@aMarCruz
Copy link
Owner

@gabeotisbenson , thanks for your feedback. What are your versions of rollup, node, and SO ?

@ghost
Copy link
Author

ghost commented Apr 22, 2019

No problem!

rollup: 1.10.1
node: 11.14.0
OS: Arch Linux

@aMarCruz
Copy link
Owner

thanks, I will check it asap

@StreetStrider
Copy link
Contributor

@gabeotisbenson afaik, null character is an internal indicator of some rollup feature (like skip import or smth, I'm not sure). I've faced it before with typescript plugin in similar error.

Have the same issue.

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

2 participants