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

unknown filter ":babel" #7725

Closed
ghost opened this issue Apr 13, 2018 · 9 comments
Closed

unknown filter ":babel" #7725

ghost opened this issue Apr 13, 2018 · 9 comments
Labels
Needs Info outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@ghost
Copy link

ghost commented Apr 13, 2018

Choose one: is this a bug report or feature request?

This is a request to the babel via the file render.pug

html
	script
		:cdata-js:babel(presets=['es2015'])
			const myFunc = () => `This is ES2015 in a CD${'ATA'}`;

I did not configure the babel and I do not need it in my case.

Should output such a conclusion:

f.default.existsSync is not a function

Now I get this error:

/home/user/nodejs/proj/views/rdr.pug:3 unknown filter ":babel"

I do not know how to solve it.

I need everything to work!

I installed the babel with this command:

npm install babel --save

Then they deleted it and tried this one:

npm install babel-cli --save
Software Version(s)
Babel latest
Babylon -
node v9.8.0
npm 5.8.0
Operating System Linux arch 4.15.8-1-ARCH #1 SMP PREEMPT Sat Mar 10 00:00:33 UTC 2018 x86_64 GNU/Linux
@babel-bot
Copy link
Collaborator

Hey @morteryler! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.

@xtuc
Copy link
Member

xtuc commented Apr 13, 2018

It seems that it's caused by Pug. Could you please provide a stack trace?

@babel-bot
Copy link
Collaborator

Hi @morteryler! A maintainer of the project has notified me that you're missing
some information we'll need to replicate this issue.

Please understand that we receive a high volume of issues, and there are only a limited number
of volunteers that help maintain this project. The easier it is for us to decipher an issue with the info provided,
the more likely it is that we'll be able to help.

Please make sure you have the following information documented in this ticket:

  1. Your Babel configuration (typically in the form of a .babelrc)
  2. The current (incorrect) behavior you're seeing
  3. The behavior you expect
  4. A short, self-contained example

Please provide either a link to the problem via the repl, or if the repl is insufficient,
a new and minimal repository with instructions on how to build/replicate the issue.

@ghost
Copy link
Author

ghost commented Apr 14, 2018

Please understand that we receive a high volume of issues, and there are only a limited number of volunteers that help maintain this project. The easier it is for us to decipher an issue with the info provided, the more likely it is that we'll be able to help.

I took it from here: https://pugjs.org/language/filters.html#nested-filters
But this example does not work.
I need to output exactly the string:

f.default.existsSync is not a function

@ghost
Copy link
Author

ghost commented Apr 14, 2018

It seems that it's caused by Pug. Could you please provide a stack trace?

Here is the complete stack trace:
log.txt

@nicolo-ribaudo
Copy link
Member

Have you installed jstransformer-babel?

@ghost
Copy link
Author

ghost commented Apr 18, 2018

Have you installed jstransformer-babel?

I installed and got a new error:

Couldn't find preset "es2015" relative to directory "/home/user/nodejs/proj/views"

@nicolo-ribaudo
Copy link
Member

What is your package.json?

@xtuc
Copy link
Member

xtuc commented Aug 26, 2018

I'm closing this due to inactivity and lack of information, feel free to open a new issue.

@xtuc xtuc closed this as completed Aug 26, 2018
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Nov 25, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Nov 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs Info outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests

3 participants