After PhpStorm update to 2022.3.1 the npm watcher fails.
If I start from terminal inside PhpStorm (version 2022.3.1), the following error is thrown:
...
Error: ENOSPC: System limit for number of file watchers reached, watch '/var/www/html/src/Administration/Resources/app/administration/src'
at FSWatcher.<computed> (node:internal/fs/watchers:244:19)
at Object.watch (node:fs:2301:34)
at createFsWatchInstance (/var/www/html/src/Administration/Resources/app/administration/node_modules/chokidar/lib/nodefs-handler.js:119:15)
at setFsWatchListener (/var/www/html/src/Administration/Resources/app/administration/node_modules/chokidar/lib/nodefs-handler.js:166:15)
at NodeFsHandler._watchWithNodeFs (/var/www/html/src/Administration/Resources/app/administration/node_modules/chokidar/lib/nodefs-handler.js:331:14)
at NodeFsHandler._handleDir (/var/www/html/src/Administration/Resources/app/administration/node_modules/chokidar/lib/nodefs-handler.js:559:19)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async NodeFsHandler._addToNodeFs (/var/www/html/src/Administration/Resources/app/administration/node_modules/chokidar/lib/nodefs-handler.js:608:16)
at async /var/www/html/src/Administration/Resources/app/administration/node_modules/chokidar/index.js:445:21
at async Promise.all (index 0)
Emitted 'error' event on FSWatcher instance at:
at FSWatcher._handleError (/var/www/html/src/Administration/Resources/app/administration/node_modules/chokidar/index.js:641:10)
at NodeFsHandler._addToNodeFs (/var/www/html/src/Administration/Resources/app/administration/node_modules/chokidar/lib/nodefs-handler.js:636:18)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async /var/www/html/src/Administration/Resources/app/administration/node_modules/chokidar/index.js:445:21
at async Promise.all (index 0) {
errno: -28,
syscall: 'watch',
code: 'ENOSPC',
path: '/var/www/html/src/Administration/Resources/app/administration/src',
filename: '/var/www/html/src/Administration/Resources/app/administration/src'
}
npm notice
npm notice New major version of npm available! 8.15.0 -> 9.3.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.3.0
npm notice Run npm install -g npm#9.3.0 to update!
npm notice
This error only appears if PhpStorm is open.
Current workaround:
Close PhpStorm.
Start the watcher request from system terminal (runs without errors).
Open PhpStorm to work on dev code.
Questions:
Where can I check my last PhpStorm update, is there a log file available?
Why PhpStorm calls more files to watch than the system terminal and is it so?
Is there a configuration for this issue in PhpStorm?
UPDATE #1
Run PhpStorm one day later and use its terminal to start the watcher, the watcher works normally. This behavior has been observed before.
Any suggestions?
Related
This is my first time using a Mac for react native dev so I installed
everything and made a project but when I try to run (npm run start) it gives
me an error. Thanks for the help if you can :)
jest-haste-map: Watchman crawl failed. Retrying once with node crawler.
Usually this happens when watchman isn't running. Create an empty .watchmanconfig file in your project's root folder or initialize a git or hg repository in your project.
Error: Watchman error: std::__1::system_error: open: /Users/struanmclean/Documents/Dovekie/App: Operation not permitted. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.
/Users/struanmclean/Documents/Dovekie/App/node_modules/metro-hermes-compiler/src/emhermesc.js:77
throw ex;
^
Error: std::__1::system_error: open: /Users/struanmclean/Documents/Dovekie/App: Operation not permitted
at BunserBuf. (/Users/struanmclean/Documents/Dovekie/App/node_modules/fb-watchman/index.js:95:23)
at BunserBuf.emit (node:events:527:28)
at BunserBuf.process (/Users/struanmclean/Documents/Dovekie/App/node_modules/bser/index.js:292:10)
at /Users/struanmclean/Documents/Dovekie/App/node_modules/bser/index.js:247:12
at processTicksAndRejections (node:internal/process/task_queues:78:11)
Emitted 'error' event on WatchmanWatcher instance at:
at Client. (/Users/struanmclean/Documents/Dovekie/App/node_modules/metro/node_modules/jest-haste-map/build/watchers/WatchmanWatcher.js:150:10)
at Client.emit (node:events:527:28)
at BunserBuf. (/Users/struanmclean/Documents/Dovekie/App/node_modules/fb-watchman/index.js:107:12)
at BunserBuf.emit (node:events:527:28)
at /Users/struanmclean/Documents/Dovekie/App/node_modules/bser/index.js:249:12
at processTicksAndRejections (node:internal/process/task_queues:78:11) {
watchmanResponse: {
error: 'std::__1::system_error: open: /Users/struanmclean/Documents/Dovekie/App: Operation not permitted',
version: '2022.06.13.00'
}
}
whenever I create a new project then it throws the following Error. I did update any settings. everything was working fine before yesterday. Here is my issue.
[1/4] Resolving packages...
error Couldn't find package **"#typescript-eslint/parser#^4.22.1"** required by **"#react-native-community/eslint-config"** on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
E:\example\project\node_modules\execa\index.js:174
err = new Error(`Command failed: ${joinedCmd}${output}`);
^
Error: Command failed: yarn add -D #babel/core #babel/runtime #react-native-community/eslint-config eslint jest babel-jest metro-react-native-babel-preset react-test-renderer#17.0.1
at makeError (E:\example\project\node_modules\execa\index.js:174:9)
at E:\example\project\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async generateProject (E:\example\project\node_modules\#react-native-community\cli\build\commands\init\initCompat.js:128:3)
at async Object.initCompat (E:\example\project\node_modules\#react-native-community\cli\build\commands\init\initCompat.js:105:3) {
code: 1,
stdout: null,
stderr: null,
failed: true,
signal: null,
cmd: 'yarn add -D #babel/core #babel/runtime #react-native-community/eslint-config eslint jest babel-jest metro-react-native-babel-preset react-test-renderer#17.0.1',
timedOut: false,
killed: false
}
I did all remove a node, update node, removed react-native-CLI, and update it and it was fixed for some time. but I was unable to install any package.
it's now day 2 and I am stuck here.
before running react-native init try running npm install #typescript-eslint/parser#^4.22.1 I hope it resolves the issue.
if the issue persists try clearing cache with:
npm cache clean --force
Finally after search for a long time. I found a solution. just go to the network setting and turn off automatic proxy setting detection.
I have Vue application that I don't run for a while and now I cannot start development server?! In meanwhile something updated and that don't work. I tried new clean vue/vuetify install and same problem!
Build for production works normally, only run development server don't work.
And important notice: when run "npm run serve" in command prompt (outside VS Code), it works normally. That not work only in VS Code Terminal. What is problem?
Node version is v10.16.0
Npm version is 6.10.3
VS Code About:
Commit: 036a6b1d3ac84e5ca96a17a44e63a87971f8fcc8
Date: 2019-08-08T02:33:50.993Z
Electron: 4.2.7
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.17763
Error (from terminal window):
> Executing task: npm run serve <
> portal#0.1.0 serve d:\Wamp64\www\portal
> vue-cli-service serve
INFO Starting development server...
10% building 2/2 modules 0 active ERROR Error: Watching remote files is not supported.
Error: Watching remote files is not supported.
at Server.setupWatchStaticFeature (d:\Wamp64\www\portal\node_modules\webpack-dev-server\lib\Server.js:405:13)
at Object.watchContentBase (d:\Wamp64\www\portal\node_modules\webpack-dev-server\lib\Server.js:477:14)
at forEach (d:\Wamp64\www\portal\node_modules\webpack-dev-server\lib\Server.js:550:24)
at Array.forEach (<anonymous>)
at Server.setupFeatures (d:\Wamp64\www\portal\node_modules\webpack-dev-server\lib\Server.js:549:49)
at new Server (d:\Wamp64\www\portal\node_modules\webpack-dev-server\lib\Server.js:125:10)
at serve (d:\Wamp64\www\portal\node_modules\#vue\cli-service\lib\commands\serve.js:139:20)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:832:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! portal#0.1.0 serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the portal#0.1.0 serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Sasa Gosovic\AppData\Roaming\npm-cache\_logs\2019-08-11T10_35_40_418Z-debug.log
The terminal process terminated with exit code: 1
Press any key to close the terminal.
Exactly the same issue here. I resolved it by rolling back the version of webpack-dev-server.
npm install webpack-dev-server#3.7.2 --save-dev
Looks like the setupWatchStaticFeature function has changed between 3.7.2 and 3.8.0 which is triggering the issue.
You can eddit the vue.config.js file, adding following code:
devServer: {
contentBase: './public'
}
More details: https://github.com/webpack/webpack-dev-server/issues/2190#issuecomment-520670599
Until the issue is open, a workaround could be to use Git Bash instead of Windows command line to run npm run serve. I modified Server.js to output the contentBase variable. When using Windows command line or Vue UI, the variable contained "c:\...". Using Git Bash on my Windows 10 machine it contains "C:\..." and it worked.
When I'm trying to make gulp --production I get this error:
[14:27:45] Using gulpfile ~/www/webpage/gulpfile.js
[14:27:45] Starting 'all'...
[14:27:45] Starting 'task'...
[14:27:45] Starting 'js-langs'...
[14:27:45] Finished 'task' after 8.53 ms
[14:27:45] Starting 'webpack'...
events.js:141
throw er; // Unhandled 'error' event
^
Error: spawn php artisan vue-i18n:generate ENOENT
at exports._errnoException (util.js:870:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:441:9)
at process._tickCallback (node.js:355:17)
at Function.Module.runMain (module.js:444:11)
at startup (node.js:136:18)
at node.js:966:3
It seems that there are a problem with Vue anyone know how to fix it?
I'm trying to find information about the error if I found it I will post it here too.
The lines inside the gulpfile that makes the error are this:
gulp.task('js-langs', shell.task([
"php artisan vue-i18n:generate",
]));
If I try to make php artisan vue-i18n:generate in terminal I get this:
Written to /home/lluisdev/www/webpage/resources/assets/js/lib/locales/vue-i18n-locales.generated.js
gulpfile
Try to replace gulp shell with exec like this :
var exec = require('child_process').exec;
gulp.task('js-langs', function (cb) {
exec('php artisan vue-i18n:generate', function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
cb(err);
});
});
And if there is some errors of version you can uninstall vue-template-compiler and reinstall it :
npm uninstall vue-template-compiler
npm install vue-template-compiler
Or you can do just :
npm update vue
Or an other way you can use this command to get you the exact version and install it for you :
npm uninstall vue-template-compiler & npm install "vue-template-compiler#$(npm list --depth=0 | awk '/vue#/{print substr($2, 5)}')"
I am getting the following error when I run the grunt command after generating the app using Yeoman generator:
Loading "grunt-karma.js" tasks...ERROR
>> TypeError: Cannot read property 'prototype' of undefined
>> Local Npm module "grunt-node-inspector" not found. Is it installed?
Running "env:dev" (env) task
Running "sass:dist" (sass) task
Running "less:dist" (less) task
Running "jshint:all" (jshint) task
>> 86 files lint free.
Running "csslint:all" (csslint) task
>> 2 files lint free.
Running "mkdir:upload" task
Running "copy:localConfig" (copy) task
Copied 1 file
Running "concurrent:default" (concurrent) task
Loading "grunt-karma.js" tasks...ERROR
>> TypeError: Cannot read property 'prototype' of undefined
Loading "grunt-karma.js" tasks...ERROR
>> TypeError: Cannot read property 'prototype' of undefined
>> Local Npm module "grunt-node-inspector" not found. Is it installed?
>> Local Npm module "grunt-node-inspector" not found. Is it installed?
Running "nodemon:dev" (nodemon) task
Running "watch" task
Waiting...
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: server.js config/**/*.js
modules/*/server/**/*.js
[nodemon] starting `node --debug server.js`
(node:16253) [DEP0062] DeprecationWarning: `node --debug` and `node --debug-brk` are invalid. Please use `node --inspect` or `node --inspect-brk` instead.
[nodemon] app crashed - waiting for file changes before starting...
I found a similar question(Yeoman grunt could not connect to MongoDB) but I was not able to find the solution to my problem there.
Is that an old version of MEAN.js? I believe grunt was replaced by gulp and also an issue regarding node-inspector was fixed by this pull request.
You should check which version you're using and make the necessary changes.