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

Syntax error during assetic:dump #454

Open
zsimaiof opened this issue Nov 9, 2016 · 4 comments
Open

Syntax error during assetic:dump #454

zsimaiof opened this issue Nov 9, 2016 · 4 comments

Comments

@zsimaiof
Copy link

zsimaiof commented Nov 9, 2016

Hi.
i have just installed the bundle along LESS (official release with node.js by using npm install -g less) and i have already installed assetic bundle (i am using Symfony 2.8).
in the config.yml i configured assetic as stated in the instructions :

assetic:
filters:
less:
node: /usr/local/bin/node/node.js
node_paths: [/usr/local/lib/node_modules]
apply_to: ".less$"
cssrewrite: ~
braincrafted_bootstrap:
css_preprocessor: less

when i try to php app/console assetic:dump i get the following error :

[Assetic\Exception\FilterException]
An error occurred while running:
'/usr/local/bin/node/node.js' '/tmp/assetic_less7terOU'
Error Output:
/usr/local/bin/node/node.js: line 1: syntax error near unexpected token (' /usr/local/bin/node/node.js: line 1: var Node = function() {'

What is wrong????? Is it possible to have

@mvrhov
Copy link
Contributor

mvrhov commented Nov 9, 2016

You are using an too old version of assetic bundle.

@zsimaiof
Copy link
Author

zsimaiof commented Nov 9, 2016

Take a look at my composer.json. i am using dev-master.
{
"name": "root/records_edit",
"license": "proprietary",
"type": "project",
"autoload": {
"psr-4": {
"": "src/"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
"repositories": [
{
"type": "package",
"package": {
"name": "jquery/jquery",
"version": "1.11.1",
"dist": {
"url": "https://code.jquery.com/jquery-1.11.1.js",
"type": "file"
}
}
}
],
"require": {
"php": ">=5.3.9",
"symfony/symfony": "2.8.",
"doctrine/orm": "^2.4.8",
"doctrine/doctrine-bundle": "~1.4",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "~2.0",
"symfony/assetic-bundle":"dev-master",
"twbs/bootstrap": "3.0.
",
"jquery/jquery": "1.11.*",
"knplabs/knp-paginator-bundle": "dev-master",
"knplabs/knp-menu-bundle": "dev-master",
"knplabs/knp-menu": "dev-master",
"braincrafted/bootstrap-bundle": "~2.0"

},
"require-dev": {
    "sensio/generator-bundle": "~3.0",
    "symfony/phpunit-bridge": "~2.7"
},
"scripts": {
    "symfony-scripts": [
        "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
    ],
    "post-install-cmd": [
        "@symfony-scripts"

    ],
    "post-update-cmd": [
        "@symfony-scripts"

    ]
},
"config": {
    "bin-dir": "bin"
},
"extra": {
    "symfony-app-dir": "app",
    "symfony-web-dir": "web",
    "symfony-assets-install": "relative",
    "incenteev-parameters": {
        "file": "app/config/parameters.yml"
    },
    "branch-alias": null
}

}

@zsimaiof
Copy link
Author

i have updated to version 2.8 of assetic .
it still comes up with the error :
[Assetic\Exception\FilterException] An error occurred while running: '/usr/local/bin/node/node.js' '/tmp/assetic_less7terOU' Error Output: /usr/local/bin/node/node.js: line 1: syntax error near unexpected token (' /usr/local/bin/node/node.js: line 1:var Node = function() {'

during the assetic:dump
I am attaching the composer show in order to take a look at the versions installed and check for possible conflicts.
image

@mvrhov
Copy link
Contributor

mvrhov commented Nov 14, 2016

You should try the master version of assetic, if it still doesn't work, then you have installed to new version of less

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