-
Notifications
You must be signed in to change notification settings - Fork 555
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
Can not find module "less" on windows + assetic hangs #185
Comments
Here are the paths as in assetic/Filter/lessFilter.php :
|
After some debugging and searching, it appears to be a mix of issues.
|
I'm also having the same issue. After moving shit around for hours.. the node script that gets generated does actually return the results but PHP hangs fetching the output. Upgrading to 5.3.9 hasn't helped either. |
noetix our solution was to move on to Linux. Files bigger than 4096 bytes makes the system going for an infinite loop. We were looking hard for a solution on Windows but it was taking to long and no solutions ahead. The quickest way for us was to install a virtual machine running Linux with a shared directory for dev. |
Php 5.3.9 almost fixed it for me, but not quite. |
For staging & production I use Debian and it took minutes to get it firing, but my local dev env is Windows 7. I guess a Linux VM would have worked, but it does seem like overkill. Resolution, I've decided to use CSS version of Twitter Bootstrap. I'll revisit once PHP fixes the issue. Thanks for your help guys. |
Any workaround for windows? I am using Windows 8 with PHP 5.4.7. Running php console assetic:dump, I get: Dumping all dev assets. Error Output: |
I have same problem, even I have already added a NODE_PATH for windows. Also I tried to set both nodejs bin path and nodejs module path by:
there is not error messag but I got a empty output. Then I tried to debug LessFilter.php by:
The tmp file for nodejs created success as :
but the $proc->getOutput() is empty. I direct run command send Symfony\Component\Process to is OK
So my guess is the issue cause by Symfony\Component\Process not catch CMD output correct. |
I'm experiencing a similar problem a the users above, on a windows 7 x64 machine with php 5.4.7. Using node v0.10.0,
Running
but running both |
Same problem here on Windows7 x64 on WAMP. An error occurred while running: Input:
the problem is that also after some second installed node and all the stuff just today from current repo. |
I was getting these problems. I realised that when you run: npm install -g less I noticed in the output that it installs the 'less' library into my user's roaming profile: C:\Users\Ben\AppData\Roaming\npm\node_modules\less When I put this path in my node_paths, the problem went away:
|
I was testing, testing and testing one and another method or posibility, until I reached that page: kriswallsmith/assetic#185 that opened my eyes, and one value was missing: node_paths /usr/lib/node_modules I continously received: [exception] 500 | Internal Server Error | Assetic\Exception\FilterException [message] An error occurred while running: &symfony#39;/usr/bin/node&symfony#39; &symfony#39;/tmp/assetic_styluswWvcnS&symfony#39; Error Output: module.js:340 throw err; ^ Error: Cannot find module &symfony#39;stylus&symfony#39; so, this fixes and finishes my 6 hours quest.
this is what I did, and it ran OK now. hope it is helpful to you |
Just move your node_modules to C:\Users\USERNAME\ directory |
I've added such parameters to parameters.yml: assetic.node.paths:
- D:/Development/Servers/nodejs/node_modules/npm/node_modules #this is where nodejs installed
- C:/Users/Developer/AppData/Roaming/npm/node_modules #this is another (global?) path Where first path is where nodejs installed, the and it solved my problem. |
I tried all of these solution. Thanks @smilesrg !!! His modification solved my problem too ! |
Found the same error in Win 7 x64 and PHP 5.6
Here is where things are getting interesting. The modules are meant to be found in However in my case it was in Not sure what the actual directory should be. Just find the
assetic: ... filters: less: node: "node" node_paths: - "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\" ... apply_to: "\\.less$" ... |
Running symfony 2.0.9 on windows 7 with assetic 1.0.x branch ( latest commit b143e36 ).
Running into this error with Less filter ( this is the output of the css file ):
I have tried with these branches and get the same error.
lessc-bin ( c274e92 )
inherit-env ( 56cae67 )
Trying to catch a more interesting error in assetic/Util/process.php with
leads me to this comand
Executing this command in the console gets this error
My understanding is that node.js is not given the correct path to less. This is my config.yml
I am quite stuck, thank you in advance for any hint.
The text was updated successfully, but these errors were encountered: