Error: watch EMFILE when putting node_modules in /public - meteor

Supposedly, I'm supposed to put node_modules into /public in Meteor. This works fine, up until a point where I get a lot of files in the node_modules directory, and I start getting this error:
Error: watch EMFILE
at errnoException (fs.js:648:11)
at FSWatcher.start (fs.js:675:11)
at Object.watch (fs.js:703:11)
at [object Object]._scan (/usr/local/meteor/app/meteor/run.js:347:12)
at /usr/local/meteor/app/meteor/run.js:362:14
at Array.forEach (native)
at Function.<anonymous> (/usr/local/meteor/app/lib/third/underscore.js:76:11)
at [object Object]._scan (/usr/local/meteor/app/meteor/run.js:361:9)
at /usr/local/meteor/app/meteor/run.js:362:14
at Array.forEach (native)
How should I deal with this?

This command solves it in linux :
sudo sh -c 'echo 8192 > /proc/sys/fs/inotify/max_user_instances'

Related

meteor Error: Cannot find module '#babel/runtime/helpers/builtin/interopRequireDefault'

Having this error:
W20180804-11:57:23.254(1)? (STDERR) Error: Cannot find module '#babel/runtime/helpers/builtin/interopRequireDefault'
W20180804-11:57:23.254(1)? (STDERR) at Function.Module._resolveFilename (module.js:547:15)
W20180804-11:57:23.254(1)? (STDERR) at Function.resolve (internal/module.js:18:19)
W20180804-11:57:23.254(1)? (STDERR) at Object.require (/home/inu/workspace/meteor/lff3/.meteor/local/build/programs/server/boot.js:288:32)
W20180804-11:57:23.254(1)? (STDERR) at makeInstallerOptions.fallback (packages/modules-runtime.js:653:18)
W20180804-11:57:23.254(1)? (STDERR) at require (packages/modules-runtime.js:244:16)
W20180804-11:57:23.255(1)? (STDERR) at livedata_connection.js (/home/inu/workspace/meteor/lff3/.meteor/local/build/programs/server/packages/ddp-client.js:147:30)
W20180804-11:57:23.255(1)? (STDERR) at fileEvaluate (packages/modules-runtime.js:339:7)
W20180804-11:57:23.255(1)? (STDERR) at require (packages/modules-runtime.js:238:16)
W20180804-11:57:23.255(1)? (STDERR) at namespace.js (packages/ddp-client/common/namespace.js:1:300)
W20180804-11:57:23.255(1)? (STDERR) at fileEvaluate (packages/modules-runtime.js:339:7)
Already tried installing latest babel runtime with no success.
meteor npm install #babel/runtime#latest
This has been traced in the forums as an incompatibility with the latest version of #babel/runtime.
Change the corresponding line in the package.json file
"dependencies": {
"#babel/runtime": "7.0.0-beta.55",
and then do
meteor npm install
Am using "react-native": "0.57.1"
I come across it today and I running
"$ npm add #babel/runtime"
fixed it
I came across the same error when I installed version 7.0.0-beta.56. I figured it was a development bug, since it was not more than 2 hours since they had released this new version. So I followed up and saw that the builtin/ folder did not exist, (this folder should be inside the helpers/ folder) and the files that the builtin/ folder should contain were at the same level, that is, in the helpers/ folder, so the easiest solution I found was to create builtin/ folder inside helpers/ folder and move or copy the contents of the helpers/folder inside helpers/builtin/.
I hope that this will be helpful for those who want to continue with this version.
This is the only solution for now . Because meteor (1.7.0.3) creates app with
"#babel/runtime": "^7.0.0-beta.51"
So, We have to update the version.
npm i babel#latest should work but its not working right now, it's showing the same error as before, so for now this is the solution.
I encountered the above problem and I solved it simply by running the following command;
meteor npm install --save #babel/runtime#latest

Meteor throws errors on initial run

I've read multiple questions that are similar to the issue but none of their answers have fixed my problem. Here is a link to the other questions/answers that I've tried.
Creating meteor project throws error
meteor create project failing
I really appreciate the help determining why meteor does not work on 2 of my machines. It's running fine on my laptop. I've tried uninstalling/reinstalling meteor and node. I'm running command line in admin mode. I'm totally stuck here.
My issue/error is:
C:\Users\dbaccus\AppData\Local\.meteor\packages\meteor-tool\1.7.0_3\mt-os.window
s.x86_64\dev_bundle\lib\node_modules\meteor-promise\promise_server.js:218
throw error;
^
Error: EBUSY: resource busy or locked, symlink 'C:\Users\dbaccus\AppData\Local\.
meteor\packages\babel-compiler\7.1.1\npm\node_modules\#babel\plugin-transform-ob
ject-super' -> 'c:\Users\dbaccus\Documents\GitHub\simple-todos\.meteor\local\.bu
ild441417.build\programs\.build716012.server\npm\node_modules\meteor\babel-compi
ler\node_modules\#babel\plugin-transform-object-super'
at Object.fs.symlinkSync (fs.js:1014:18)
at Object.wrapper (C:\tools\fs\files.js:1607:35)
at symlinkWithOverwrite (C:\tools\fs\files.js:543:11)
at walk (C:\tools\isobuild\builder.js:526:9)
at optimisticReaddir.forEach.item (C:\tools\isobuild\builder.js:621:11)
at Array.forEach (<anonymous>)
at walk (C:\tools\isobuild\builder.js:532:34)
at optimisticReaddir.forEach.item (C:\tools\isobuild\builder.js:621:11)
at Array.forEach (<anonymous>)
at walk (C:\tools\isobuild\builder.js:532:34)
at Builder._copyDirectory (C:\tools\isobuild\builder.js:670:5)
at Builder.copyNodeModulesDirectory (C:\tools\isobuild\builder.js:426:17)
at C:\tools\isobuild\bundler.js:2317:17
at Function._.each._.forEach (C:\Users\dbaccus\AppData\Local\.meteor\package
s\meteor-tool\1.7.0_3\mt-os.windows.x86_64\dev_bundle\lib\node_modules\underscor
e\underscore.js:87:22)
at JsImage.write (C:\tools\isobuild\bundler.js:2276:7)
at ServerTarget.write (C:\tools\isobuild\bundler.js:2548:13)
at C:\tools\isobuild\bundler.js:2701:30
at Object.keys.forEach.name (C:\tools\isobuild\bundler.js:2836:9)
at Array.forEach (<anonymous>)
at C:\tools\isobuild\bundler.js:2826:26
at C:\tools\isobuild\bundler.js:3167:22
at C:\tools\utils\buildmessage.js:271:13
at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89
:14)
at C:\tools\utils\buildmessage.js:264:29
at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89
:14)
at C:\tools\utils\buildmessage.js:262:18
at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89
:14)
at C:\tools\utils\buildmessage.js:253:23
at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89
:14)
at Object.capture (C:\tools\utils\buildmessage.js:252:19)
at bundle (C:\tools\isobuild\bundler.js:3000:31)
at files.withCache (C:\tools\isobuild\bundler.js:2947:32)
at Object.withCache (C:\tools\fs\files.js:1710:12)
at Object.exports.bundle (C:\tools\isobuild\bundler.js:2947:16)
at Profile.run (C:\tools\runners\run-app.js:579:36)
at Function.run (C:\tools\tool-env\profile.js:490:12)
at bundleApp (C:\tools\runners\run-app.js:578:34)
at AppRunner._runOnce (C:\tools\runners\run-app.js:622:35)
at AppRunner._fiber (C:\tools\runners\run-app.js:880:28)
at C:\tools\runners\run-app.js:408:12

Updating meteor from 1.4.3.2 to 1.5 causes a build error with ecmascript package on MacOS

I have updated meteor for the project to 1.5 and have done the following:
ran meteor update
reinstalled node_modules
ran meteor reset
The relevant github issue
The error message is:
While processing files with ecmascript (for target web.browser): /tools/isobuild/compiler-plugin.js:376:52: Cannot read property 'id' of null
at InputFile.resolve (/tools/isobuild/compiler-plugin.js:376:52)
at InputFile._require (/tools/isobuild/compiler-plugin.js:386:25)
at InputFile.require (/tools/isobuild/compiler-plugin.js:380:17)
at requireWithPrefix (packages/babel-compiler.js:428:32)
at requireWithPath (packages/babel-compiler.js:357:14)
at resolveHelper (packages/babel-compiler.js:330:22)
at packages/babel-compiler.js:306:19
at Array.forEach (native)
at walkHelper (packages/babel-compiler.js:305:22)
at walkBabelRC (packages/babel-compiler.js:295:7)
at resolveHelper (packages/babel-compiler.js:333:11)
at packages/babel-compiler.js:306:19
at Array.forEach (native)
at walkHelper (packages/babel-compiler.js:305:22)
at walkBabelRC (packages/babel-compiler.js:295:7)
at BabelCompiler.BCp._inferHelper (packages/babel-compiler.js:380:3)
at BabelCompiler.BCp._inferFromPackageJson (packages/babel-compiler.js:268:17)
at BabelCompiler.BCp.inferExtraBabelOptions (packages/babel-compiler.js:237:10)
at BabelCompiler.BCp.processOneFileForTarget (packages/babel-compiler.js:166:10)
at BabelCompiler.<anonymous> (packages/babel-compiler.js:109:26)
at Array.forEach (native)
at BabelCompiler.BCp.processFilesForTarget (packages/babel-compiler.js:108:14)

Patch update to Meteor 1.4.1.2 fail to find program.json

The command to update Meteor meteor update --patch gave the error:
$meteor update --patch
/Users/empl1/.meteor/packages/meteor-tool/.1.4.1_2.5y3whq++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/isopackets/ddp/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:165
throw error;
^
Error: ENOENT: no such file or directory, open '/private/var/folders/8y/63l591316sz2mxwr1kq551bm0000gp/T/mt-hqj7n0/plugin.compileLessBatch.os/program.json'
at Error (native)
Any idea what can fix this? Thanks

Box2d-Web with Meteor

I want to use Box2D-Web with Meteorjs on both client and server side. I used this in nodejs. There was a small configuration that exports Box2D variable, and it was working with nodejs. The additional configuration was
exports.Box2D = Box2D;
at the bottom of the libary.
But I couldn't load it in meteor. I put the Box2D-web under lib directory in my project. But it gives an error and I still don't see what the problem is.
Here is what meteor saying;
W20140106-00:15:03.627(2)? (STDERR) /Users/ahmetdal/workspace/realhaxtmp/.meteor/local/build/programs/server/boot.js:186
W20140106-00:15:03.692(2)? (STDERR) }).run();
W20140106-00:15:03.692(2)? (STDERR) ^
W20140106-00:15:03.692(2)? (STDERR) TypeError: Cannot call method 'write' of undefined
W20140106-00:15:03.693(2)? (STDERR) at Console.log (console.js:53:16)
W20140106-00:15:03.694(2)? (STDERR) at Object.Meteor._debug (packages/meteor/debug.js:41)
W20140106-00:15:03.694(2)? (STDERR) at _.extend.publish (packages/livedata/livedata_server.js:1166)
W20140106-00:15:03.694(2)? (STDERR) at app/server/publications.js:7:12
W20140106-00:15:03.694(2)? (STDERR) at /Users/ahmetdal/workspace/realhaxtmp/.meteor/local/build/programs/server/boot.js:159:61
W20140106-00:15:03.694(2)? (STDERR) at Array.forEach (native)
W20140106-00:15:03.694(2)? (STDERR) at Function._.each._.forEach (/Users/ahmetdal/.meteor/tools/09b63f1ed5/lib/node_modules/underscore/underscore.js:79:11)
W20140106-00:15:03.695(2)? (STDERR) at /Users/ahmetdal/workspace/realhaxtmp/.meteor/local/build/programs/server/boot.js:159:5
There is not error about the Box2D-Web library. I tried to find any alternative meaning for the error but, I could not find anything either.
This error is being occurred when I put the library under lib folder under project root.
I did not put all code of library here. Because it really consists of too many lines of codes.
What additional configration in library can I do to apply it to Meteorjs?
Thank you!
Placing Javascript files like the Box2D-Web library in the lib folder in the root of your project will cause the code to be run on both the client and the server. The error occurs when the library gets run on the server.
To fix this, just place the library file into /client/lib/.

Resources