Meteor crashing while building - javascript

I am building a fairly rather simple Meteor project on Windows 8, and despite both re-installing meteor, and manually re-setting the library, after the app has run for a short time meteor crashes and will not restart. Meteor is also unable to run reset, and I haven't been able to identify exactly what it is that causes this arise in the first place. There is a consistent error I get from the ccorcos:swipe, but runtime errors should not be crashing meteor right?
I have tried changing/removing the files in .meteor/client.
My question is both to identify what could be causing this particular error (what does "stat" mean in this context? other error messages I have found have while searching have been far more useful) as well as generally if there is a faster way of hard resetting a meteor project than running meteor create proj_name in a new folder and manually moving over the source files.
The stacktrace is below.
The packages I use are
meteor-platform
insecure
bevanhunt:leaflet
mdg:geolocation
accounts-facebook
service-configuration
less stevezhu:lodash
ccorcos:swipe
iron:router
underscore
coffeescript
accounts-ui
accounts-password
C:\Users\Fjafjan\Documents\GitHub\progress>meteor run
[[[[[ C:\Users\Fjafjan\Documents\GitHub\progress ]]]]]
=> Started proxy.
=> Started MongoDB.
C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\dev_bundle\lib\node_modules\fibers\future.js:245
throw(ex);
^
Error: EPERM, stat 'C:\Users\Fjafjan\Documents\GitHub\progress\.meteor\local\build\programs\web.browser\packages'
at Object.Future.wait (C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\dev_bundle\lib\node_modules\
fibers\future.js:398:15)
at Object.wrapper [as stat] (C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\files.js:1350:24
)
at C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\files.js:454:43
at Array.forEach (native)
at Function._.each._.forEach (C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\dev_bundle\lib\node_m
odules\underscore\underscore.js:79:11)
at Object.files.cp_r (C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\files.js:444:5)
at C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\files.js:456:13
at Array.forEach (native)
at Function._.each._.forEach (C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\dev_bundle\lib\node_m
odules\underscore\underscore.js:79:11)
at Object.files.cp_r (C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\files.js:444:5)
at C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\files.js:456:13
at Array.forEach (native)
at Function._.each._.forEach (C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\dev_bundle\lib\node_m
odules\underscore\underscore.js:79:11)
at Object.files.cp_r (C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\files.js:444:5)
at Object.files.rename (C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\files.js:1401:13)
at Object.files.renameDirAlmostAtomically (C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\fi
les.js:810:11)
at [object Object]._.extend.complete (C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\builder
.js:482:11)
at C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\bundler.js:1933:13
at C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\bundler.js:2147:20
at C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\buildmessage.js:264:13
at [object Object]._.extend.withValue (C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\fiber-
helpers.js:115:14)
at C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\buildmessage.js:257:29
at [object Object]._.extend.withValue (C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\fiber-
helpers.js:115:14)
at C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\buildmessage.js:255:18
at [object Object]._.extend.withValue (C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\fiber-
helpers.js:115:14)
at C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\buildmessage.js:246:23
at [object Object]._.extend.withValue (C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\fiber-
helpers.js:115:14)
at Object.capture (C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\buildmessage.js:245:19)
at Object.exports.bundle (C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\bundler.js:2040:31)
at C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\run-app.js:554:24
at time (C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\profile.js:231:28)
at Function.run (C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\profile.js:377:12)
at bundleApp (C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\run-app.js:544:34)
at [object Object]._.extend._runOnce (C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\run-app
.js:591:35)
at [object Object]._.extend._fiber (C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\run-app.j
s:821:28)
at C:\Users\Fjafjan\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\tools\run-app.js:402:12

As I'm new to programming, I can't tell you why this happens, but I was having the exact same problem. If you install a package using meteor add (package) while you have your app open in a code editor, it causes the app to break. Try closing the editor and refreshing everything. It worked for me.

Kill the meteor processes and reset the project.
ps aux | grep meteor
kill -1 [PID_OF_METEOR_PROC]
cd /path/to/project/
meteor reset
Replace [PID_OF_METEOR_PROC] with the actual PID or run once for each PID, and use the correct path to your meteor project

Related

Next build fails only on my machine with `Generating static pages (0/6)TypeError: n.replaceAll is not a function`

I am trying to build my Next.js project, but I am getting the error Generating static pages (0/6)TypeError: n.replaceAll is not a function at a file in my node_modules folder.
Steps I have taken to try to identify where the problem is coming from:
(In the following when I say install&build I mean yarn install --frozen-lockfile, then next build
delete node_modules and .next folder, insall&build -> fails
clone the repo in a new folder and install&build -> fails
Run this as a github action on github -> succeeds
Run this as a github action on my machine using this library: https://github.com/nektos/act (that uses docker) -> succeeds
do step 1 on my colleagues machine -> succeeds
do step 2 on my colleagues machine -> succeds
The full error is:
Error occurred prerendering page "/404". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: n.replaceAll is not a function
at file:///home/sev/dev/frontend/node_modules/connectkit/build/index.es.js:682:37384
at Array.forEach (<anonymous>)
at rn (file:///home/sev/dev/frontend/node_modules/connectkit/build/index.es.js:682:37367)
at file:///home/sev/dev/frontend/node_modules/connectkit/build/index.es.js:682:37304
at Array.map (<anonymous>)
at tn (file:///home/sev/dev/frontend/node_modules/connectkit/build/index.es.js:682:37270)
at kn (file:///home/sev/dev/frontend/node_modules/connectkit/build/index.es.js:682:42706)
at Wc (/home/sev/dev/frontend/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:68:44)
at Zc (/home/sev/dev/frontend/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:253)
at Z (/home/sev/dev/frontend/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
You get this error because String.prototype.replaceAll() is only supported from Node v15.0.0:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll#browser_compatibility
You will need to update your version of Node to at least this version.
I hope this helps to resolve your issue.

Error when trying to run any Cypress test

I've installed Cypress according to the cypress docs. After opening Cypress and selecting a test to run, I instantly get the following error:
**Title:** Error running plugin
Message: The following error was thrown by a plugin. We stopped running your tests because a plugin crashed. Please check your plugins file (C:\Users\metin\Desktop\Programming\School\Typescript\From JS to TS\cypress\plugins\index.js)
Stack trace:
Error: The following error was thrown by a plugin. We stopped running your tests because a plugin crashed. Please check your plugins file (`C:\Users\metin\Desktop\Programming\School\Typescript\From JS to TS\cypress\plugins\index.js`)
at Object.get (C:\Users\metin\AppData\Local\Cypress\Cache\9.1.0\Cypress\resources\app\packages\server\lib\errors.js:1043:15)
at EventEmitter.handleError (C:\Users\metin\AppData\Local\Cypress\Cache\9.1.0\Cypress\resources\app\packages\server\lib\plugins\index.js:189:20)
at EventEmitter.emit (node:events:394:28)
at ChildProcess.<anonymous> (C:\Users\metin\AppData\Local\Cypress\Cache\9.1.0\Cypress\resources\app\packages\server\lib\plugins\util.js:19:22)
at ChildProcess.emit (node:events:394:28)
at emit (node:internal/child_process:920:12)
at processTicksAndRejections (node:internal/process/task_queues:84:21)
I've been googling for a few hours and I'm looking for help on how to resolve this issue!
Uninstall Nodejs
Download the Nodejs (Recommended For Most Users) version from the link:
https://nodejs.org/en/
Install the downloaded Nodejs
I had the same issues
in my case, this issue was related to my bitbucket.yml.file, I changed: max-time:(set time for running your tests) in my job, and everything works fine
If you're using Cucumber then review your step files in search of misspelling keywords or case sensitive typos like wHEN or thEn

Meteor app is crashing

I am very new to meteor and am trying to start a previous employees app. I downloaded the repo and installed meteor. When I installed the npm packages and did meteor run, the app crashed.
It gives me this error.
Your app is crashing. Here's the latest log:
{ [Error: Cannot find module './build/Release/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }
{ [Error: Cannot find module './build/default/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }
{ [Error: Cannot find module './build/Debug/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }
/Users/joey.diperi/.meteor/packages/meteor-tool/.1.3.2_4.yyk0ym.tlxjp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:267
throw(ex);
^
Error: Match error: Missing key 'AWSAccessKeyId'
at exports.check (packages/check/match.js:34:1)
at new Slingshot.Directive (packages/edgee_slingshot/packages/edgee_slingshot.js:304:1)
at Object.Slingshot.createDirective (packages/edgee_slingshot/packages/edgee_slingshot.js:274:1)
at meteorInstall.server.config.slingshot.js (server/config/slingshot.js:1:11)
at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:141:1)
at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:75:1)
at /Users/joey.diperi/Documents/websites/bold_ideas/.meteor/local/build/programs/server/app/app.js:2723:1
at /Users/joey.diperi/Documents/websites/bold_ideas/.meteor/local/build/programs/server/boot.js:283:10
at Array.forEach (native)
at Function._.each._.forEach (/Users/joey.diperi/.meteor/packages/meteor-tool/.1.3.2_4.yyk0ym.tlxjp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
Exited with code: 8
Your application is crashing. Waiting for file change.
I see in the startup.js page there are properties attached to the Meteor.settings object. Are the deployment keys usually kept in the Meteor.settings object in meteor?

testing with mocha: descibe is not defined

I have a problem with testing Meteor. I have just started with this framework and I'm following the official tutorial to create the sample to-do app.
During this passage: https://www.meteor.com/tutorials/blaze/testing the tutorial explain how to install the mocha package for meteor and how to run the test, the problem is that after finishing all the passages (the code is the same as the tutorial) I run the meteor server with the test command (meteor test --driver-package practicalmeteor:mocha) but I get this error:
ReferenceError: descibe is not defined
at Suite.<anonymous> (imports/api/tasks.tests.js:9:9)
at context.describe.context.context (/Users/ste/.meteor/packages/practicalmeteor_mocha-core/.1.0.1.yt8rvz++os+web.browser+web.cordova/npm/node_modules/mocha/lib/interfaces/bdd.js:47:10)
at meteorInstall.imports.api.tasks.tests.js (imports/api/tasks.tests.js:8:5)
at fileEvaluate (packages/modules-runtime.js:197:9)
at require (packages/modules-runtime.js:120:16)
at /private/var/folders/6b/vnbc8yxx3pv21r1bt6_1kvkr0000gn/T/meteor-test-runr4itrg/.meteor/local/build/programs/server/app/app.js:191:1
at /private/var/folders/6b/vnbc8yxx3pv21r1bt6_1kvkr0000gn/T/meteor-test-runr4itrg/.meteor/local/build/programs/server/boot.js:303:34
at Array.forEach (native)
at Function._.each._.forEach (/Users/ste/.meteor/packages/meteor-tool/.1.4.3_2.p6z7ay++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
at /private/var/folders/6b/vnbc8yxx3pv21r1bt6_1kvkr0000gn/T/meteor-test-runr4itrg/.meteor/local/build/programs/server/boot.js:128:5
Exited with code: 1
Your application is crashing. Waiting for file change.
How can I fix this?

Node Express 500 Error: Unknown encoding

I am running an Express application on Nodejitsu. It's Node 0.8 and Express 3.4.0. The application works absolutely fine locally, but one of the routes has stopped working and returns the following error when I push to Nodejitsu:
Express
500 Error: Unknown encoding
at Buffer.toString (buffer.js:440:13)
at Object.fs.readFileSync (fs.js:241:33)
at handleCache (/opt/run/snapshot/package/node_modules/ejs/lib/ejs.js:65:21)
at exports.renderFile (/opt/run/snapshot/package/node_modules/ejs/lib/ejs.js:206:14)
at View.exports.__express [as engine] (/opt/run/snapshot/package/node_modules/ejs/lib/ejs.js:510:22)
at View.render (/opt/run/snapshot/package/node_modules/express/lib/view.js:76:8)
at Function.app.render (/opt/run/snapshot/package/node_modules/express/lib/application.js:504:10)
at ServerResponse.res.render (/opt/run/snapshot/package/node_modules/express/lib/response.js:798:7)
at exports.m2 (/opt/run/snapshot/package/routes/login.js:27:9)
at callbacks (/opt/run/snapshot/package/node_modules/express/lib/router/index.js:164:37)
I have nt changed anything about the route. I added a new route to the sme routing file which works, but should not affect this route). I haven't changes the view template in any way, or done anything I can think of to change the encoding. Given that Nodejitsu just takes my package.json and installs all the same modules, everything about the app should be identical.
I'm not sure how to track down the issue since the Nodejitsu logs are identical to the output error and I can't reproduce locally. I tried commenting out the new route, and it had no effect.

Categories