Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

grunt hits "ENOTSUP" issue due to old version of glob being used #1787

Closed
xirzec opened this issue Nov 4, 2015 · 6 comments
Closed

grunt hits "ENOTSUP" issue due to old version of glob being used #1787

xirzec opened this issue Nov 4, 2015 · 6 comments

Comments

@xirzec
Copy link

xirzec commented Nov 4, 2015

Similar to #1573 I'm seeing an issue when running grunt in a custom deployment command:

remote: Running "ts:src" (ts) task remote: Error: ENOTSUP: operation not supported on socket, scandir 'D:\home\site\wwwroot\src\app.tsx'

Looks like the culprit is this glob bug not being updated in grunt's dependencies: isaacs/node-glob#205

@ahmelsayed
Copy link
Member

Would you be able to provide a repro? either a repo or a list of steps here would help in verifying a fix.
It's pretty odd how the same npm package version can change behavior depending on when you install it because the dependencies change from underneath it

@xirzec
Copy link
Author

xirzec commented Nov 5, 2015

Hey @ahmelsayed - I actually was able to work around this by using npm shrinkwrap and overriding the glob dependency for my grunt dependency. Working like a charm now (had to prune on the remote first though, for anyone trying this at home.)

I also filed a bug on grunt to hopefully update this in the future: gruntjs/grunt#1401

@xirzec xirzec closed this as completed Nov 5, 2015
@floydpink
Copy link

It looks like the old version glob is still being used as a dependency by grunt and the issue gruntjs/grunt#1401 mentioned above is still open.

@xirzec - could you please help me understand how npm shrinkwrap can be used from within the custom deployment script?

@xirzec
Copy link
Author

xirzec commented Feb 4, 2016

@floydpink sorry for the late reply, but npm shrinkwrap was an orthogonal fix. What I did was:

  1. Run npm shrinkwrap
  2. Hand edit the resulting npm-shrinkwrap.json file to have the right versions I wanted for dependencies
  3. Add/commit npm-shrinkwrap.json to my repo
  4. Push to kudu again

Then when kudu ran npm install it picked up the right versions. I think I had to go into my site and delete the node_modules folder by hand first to make it work though.

Another alternative that I've been using (instead of kudu) is another one of @davidebbo's tools:

https://github.com/davidebbo/WAWSDeploy

This lets me directly upload my entire app folder that I've built locally, negating the need to build on the server at all. It's a little less efficient because I am copying up the node_modules folder the first time, but it's actually not that slow. I find it very similar to how npm publish works.

If you go that route make sure you have WebDeploy already installed on your machine. Granted this will only work on Windows, so apologies if you're on Mac/Linux.

@floydpink
Copy link

Thank you, @xirzec - I tried to get npm-shrinkwrap to work for a while and then moved on.

Although, automatic/continuous deployments are a no-go at this point because of this glob related issue, we have gone to a grunt-build-control based manual (semi--auto) deployment, which builds and tests the web app locally and pushes the dist folder into Azure via the deployment credentials - and by the sound of it, should be pretty similar to WAWSDeploy that you suggested.

And this is working well from both Windows and Mac and gels well with the rest of the grunt tasks on the project.

@reyou
Copy link

reyou commented Feb 15, 2016

I having same problem while pushing on Azure. Any solution on this?

** Grunt :: An error occurred. **


�[31mAborted due to warnings.�[39m
Running "clean:dev" (clean) task�[24m

�[33mWarning: ENOTSUP: operation not supported on socket, scandir 'D:\home\site\wwwroot.tmp\public\concat\production.css'� �[39m

Looks like a Grunt error occurred--
Please fix it, then restart Sails to continue running tasks (e.g. watching for changes in assets)
Or if you're stuck, check out the troubleshooting tips below.
�[4mTroubleshooting tips:�[24m

*-> Are "grunt" and related grunt task modules installed locally? Run npm install if you're not sure.

*-> You might have a malformed LESS, SASS, CoffeeScript file, etc.

*-> Or maybe you don't have permissions to access the .tmp directory?
e.g., D:\home\site\wwwroot\.tmp ?

 If you think this might be the case, try running:
 sudo chown -R YOUR_COMPUTER_USER_NAME D:\home\site\wwwroot\.tmp

Error: The hook grunt is taking too long to load.
Make sure it is triggering its initialize() callback, or else set sails.config.grunt._hookTimeout to a higher value (currently 90000) at tooLong [as _onTimeout] (D:\home\site\wwwroot\node_modules\sails\lib\app\private\loadHooks.js:85:21) at Timer.listOnTimeout (timers.js:92:15) { [Error: The hookgruntis taking too long to load. Make sure it is triggering itsinitialize()callback, or else setsails.config.grunt._hookTimeout to a higher value (currently 90000)] code: 'E_HOOK_TIMEOUT' }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants