Couldn't get laika to work on meteor - meteor

I'm using meteor 0.6.4, node 0.10.12 and laika 0.2.8. I followed the instructions on the getting started page and I get this error:
injecting laika...
loading phantomjs...
cleaning up injected code
/Users/camilo/.nvm/v0.10.12/lib/node_modules/laika/lib/app.js:124
if(err) throw err;
^
Error: spawn ENOENT
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)
I switched to laika 0.2.4 based on this question Fail to run laika framework for meteor and get the same error.
Edit
I'm using phantomjs 1.9.1 installed with homebrew
Edit 2
I updated laika to 0.2.13 and tried with mrt (I was using meteor) but now the problem is different. With laika -D I get this:
[laika log] accepting the following extensions: (js)
injecting laika...
loading phantomjs...
[app touch log]
[app touch log] Stand back while Meteorite does its thing
[app touch log]
[app touch log] Done installing smart packages
[app touch log] Ok, everything's ready. Here comes Meteor!
[app touch log] [[[[[ ~/Documents/Pruebas/Meteor/test ]]]]]
[app touch log] => Meteor server running on: http://localhost:25969/
After a while, this error appear:
phantom stderr:
phantom stderr: child_process.js:927
throw errnoException(process._errno, 'spawn');
^
Error: spawn EAGAIN
at errnoException (child_process.js:980:11)
at ChildProcess.spawn (child_process.js:927:11)
at exports.spawn (child_process.js:715:9)
at Object.<anonymous> (/Users/camilo/.nvm/v0.10.12/lib/node_modules/phantomjs/bin/phantomjs:12:10)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
phantom crash: code 8
I uninstalled phantomjs, put the phantomjs binary on the same project folder and tested again but get the same error.

After many attempts, apparently the problem was with phantomjs. Installing it with homebrew or putting the binary directly on the project doesn't work for me. After update laika to 0.2.14 and install phantomjs with sudo npm install -g phantomjs it worked.

This is not a phantomjs basic issue. But a issue with nodejs version used by laika.
Please update laika to 0.2.13 and run laika -D which gives some verbose logs. lets talk about after that.
Normally, if your project runs with meteor (not mrt), laika uses binary located at following location.
~/.meteor/tools/latest/bin/node

Related

Symfony encore watch and vscode Remote SSH development freeze the server when running at the same time

I'm developing my Symfony project on a remote server and use Vscode Remore SSH plugin to writing code on it.
I use symfony Webpack Encore to build front side, and if I try to run commands like yarn encore dev or yarn watch to let webpack to rebuild my assets when vscode is working and connected to the server all freeze.
Web pages become loading very long time, vscode cannot save anything and the command line may show sting Running webpack ... without any results a minutes or throw an error like this
[webpack-cli] Failed to load '/var/proj/veto/webpack.config.js' config
[webpack-cli] Error: Timed out waiting for sync-rpc server to start (it should respond with "pong" when sent "ping"):
node:events:491
throw er; // Unhandled 'error' event
^
Error: connect ECONNREFUSED 127.0.0.1:36465
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)
Emitted 'error' event on Socket instance at:
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 36465
}
at waitForAlive (/var/proj/veto/node_modules/sync-rpc/lib/index.js:85:11)
at start (/var/proj/veto/node_modules/sync-rpc/lib/index.js:41:3)
at sendMessage (/var/proj/veto/node_modules/sync-rpc/lib/index.js:133:17)
at createClient (/var/proj/veto/node_modules/sync-rpc/lib/index.js:173:27)
at Object.<anonymous> (/var/proj/veto/node_modules/#symfony/webpack-encore/lib/plugins/eslint.js:13:32)
at Module._compile (node:internal/modules/cjs/loader:1165:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
at Module.load (node:internal/modules/cjs/loader:1043:32)
at Function.Module._load (node:internal/modules/cjs/loader:878:12)
at Module.require (node:internal/modules/cjs/loader:1067:19)
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
When vscode doesn't work webpack's running without any problems. When I'm writing and saving code and do not use webpack all works great either.
I have very few ideas how can I fix it. How may it be related?
I tried to turn off vscode plugins that may scanning the project, but it didn't help

Vercel - TypeError: Cannot read property 'system' of undefined

It looks like my build is working fine. (And build fine locally).
But I get this error when deploying to Vercel.
08:04:54.329 [4/4] Building fresh packages...
08:04:56.738 success Saved lockfile.
08:04:56.742 Done in 39.69s.
08:04:56.778 Detected Next.js version: 10.0.3
08:04:56.779 Running "yarn run build"
08:04:57.063 yarn run v1.22.10
08:04:57.106 $ next build
08:04:57.789 Browserslist: caniuse-lite is outdated. Please run:
08:04:57.790 npx browserslist#latest --update-db
08:04:57.894 info - Creating an optimized production build...
08:04:57.915 Attention: Next.js now collects completely anonymous telemetry regarding usage.
08:04:57.915 This information is used to shape Next.js' roadmap and prioritize features.
08:04:57.915 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
08:04:57.915 https://nextjs.org/telemetry
08:06:05.124 info - Compiled successfully
08:06:05.125 info - Collecting page data...
08:06:07.309 > Build error occurred
08:06:07.312 TypeError: Cannot read property 'system' of undefined
08:06:07.312 at Object.get (/vercel/workpath0/node_modules/faker/lib/index.js:75:47)
08:06:07.312 at new System (/vercel/workpath0/node_modules/faker/lib/system.js:41:44)
08:06:07.312 at new Faker (/vercel/workpath0/node_modules/faker/lib/index.js:147:17)
08:06:07.312 at Object.<anonymous> (/vercel/workpath0/node_modules/faker/locale/en_US.js:2:13)
08:06:07.312 at Module._compile (internal/modules/cjs/loader.js:1063:30)
08:06:07.312 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
08:06:07.312 at Module.load (internal/modules/cjs/loader.js:928:32)
08:06:07.313 at Function.Module._load (internal/modules/cjs/loader.js:769:14)
08:06:07.317 at Module.require (internal/modules/cjs/loader.js:952:19)
08:06:07.317 at require (internal/modules/cjs/helpers.js:88:18) {
08:06:07.317 type: 'TypeError'
08:06:07.318 }
08:06:07.468 error Command failed with exit code 1.
08:06:07.469 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
08:06:07.486 Error: Command "yarn run build" exited with 1
08:06:10.181 Done with "package.json"
As #juliomalves pointed out. It was faker's fault. It was working fine, then suddenly it wasn't. I ended up just removing it from my packages.
yarn remove faker
And just stripped it out of the project as it was just being used for demo stuff. Now all good.

Uncaught Error: Cannot find module 'stream'

Upon upgrading from Reaction Commerce v1.21.1 to v1.13.0 (which uses Meteor 1.7.0.1) I started getting the following stream error:
modules-runtime.js?hash=59942621baf2d3ff23916a0f601008fd2e310b63:241 Uncaught Error: Cannot find module 'stream'
at makeMissingError (modules-runtime.js?hash=59942621baf2d3ff23916a0f601008fd2e310b63:241)
at require (modules-runtime.js?hash=59942621baf2d3ff23916a0f601008fd2e310b63:251)
at bunyan.js (modules.js?hash=e8f82e706d01284fec46024b7d677bc1323d896a:47108)
at fileEvaluate (modules-runtime.js?hash=59942621baf2d3ff23916a0f601008fd2e310b63:349)
at require (modules-runtime.js?hash=59942621baf2d3ff23916a0f601008fd2e310b63:248)
at main.js (modules.js?hash=e8f82e706d01284fec46024b7d677bc1323d896a:46804)
at fileEvaluate (modules-runtime.js?hash=59942621baf2d3ff23916a0f601008fd2e310b63:349)
at require (modules-runtime.js?hash=59942621baf2d3ff23916a0f601008fd2e310b63:248)
at index.js (index.js:1)
at fileEvaluate (modules-runtime.js?hash=59942621baf2d3ff23916a0f601008fd2e310b63:349)
I did an rc reset -y (equivalent to meteor reset) deleting all node_modules and installing anew. Alas, this attempt did not prevail.
I then found this Stack Overflow answer and tried reinstalling Meteor with the meteor install script, no to avail:
https://stackoverflow.com/a/13314141/1762493
Here's my code:
https://github.com/MassDistributionMedia/rc-ca-blinds/tree/feature/version/rc1.13.0-dev1
I fixed this by using yarn instead of npm install on Meteor 1.8.0.2.
https://github.com/meteor/meteor/issues/10451

Meteor build error on windows 8.1

I have installed Meteor on Windows 8.1 - 64 bit to continue developing an existing meteor app. But, I cannot start it.
Problem
I run "meteor run": it starts proxy, MongoDB, selects packages, and after the last step, "Building the application", I get an error which I cannot explain (see stack trace). Then, it keeps trying to build the app, and gives the same errors over and over again.
Strange things:
the exact same project works just fine on Ubuntu and Mac OS - now I want to use Windows 8.1 (note: I have cloned the repository using git)
the demo app "todos" works on my meteor on Windows 8.1
What I tried
I had reinstalled Meteor, checked the packages (I have both npm&node.js) meteor --test-packages, meteor --reset, google all the info from the trace or any other question about meteor building errors on Windows 8.1, but couldn't solve my problem.
My questions:
How to make it work?
Does it have to do with Windows 8.1 itself or do I just don't have something installed/set on this pc.
Update 1
I created a new meteor project and copied all the files to this new folder. I started to add all the packages, and it seems that the problem appears when I add this package:
oauth-encryption
It seems to be the same problem as the one here: https://github.com/reactioncommerce/reaction/issues/363. But still, can't find the solution.
Stack trace
C:\Users\Cristi\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-
os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:245
throw(ex);
^
Error: The operating system cannot run %1.
C:\Users\Cristi\AppData\Local\.meteor\packages\npm-node-aes-gcm\0.1.3_6\npm\node_modules\node-aes-gcm\build\Release\node_aes_gcm.node
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.Npm.require (D:\Projects\time\.meteor\local\build\programs\server\boot.js:142:18)
at Package (packages/npm-node-aes-gcm/wrapper.js:2:1)
at D:\Projects\time\.meteor\local\build\programs\server\packages\npm-node-aes-gcm.js:33:4
at D:\Projects\time\.meteor\local\build\programs\server\packages\npm-node-aes-gcm.js:42:3
(STDERR) at D:\Projects\time\.meteor\local\build\programs\server\boot.js:222:10
(STDERR) at Array.forEach (native)

Meteor unable to run application after adding ui-accounts

I decided to try out Meteor and found myself a tutorial to follow.
So as one does I googled "Meteor tutorials" and this one is at the top of the results list:
http://www.smashingmagazine.com/2013/06/13/build-app-45-minutes-meteor/
Hey all!
So - I start following the tutorial but as soon as I get to step 2 meteor isn't able to run my application anymore.
The log is as follows:
Your app is crashing. Here's the latest log.
W2047-00:56:09.699(0)? (STDERR) /home/vidirr/.meteor/packages/mongo- livedata/45bb567dec/npm/node_modules/mongodb/lib/mongodb/mongo_client.js:359
W2047-00:56:09.700(0)? (STDERR) throw err
W2047-00:56:09.700(0)? (STDERR) ^
W2047-00:56:09.702(0)? (STDERR) Error: failed to connect to [127.0.0.1:3002]
W2047-00:56:09.704(0)? (STDERR) at null.<anonymous> (/home/vidirr/.meteor/packages/mongo-livedata/45bb567dec/npm/node_modules/mongodb/lib/mongodb/connection/server.js:540:74)
W2047-00:56:09.704(0)? (STDERR) at EventEmitter.emit (events.js:106:17)
W2047-00:56:09.704(0)? (STDERR) at null.<anonymous> (/home/vidirr/.meteor/packages/mongo-livedata/45bb567dec/npm/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:140:15)
W2047-00:56:09.705(0)? (STDERR) at EventEmitter.emit (events.js:98:17)
W2047-00:56:09.705(0)? (STDERR) at Socket.<anonymous> (/home/vidirr/.meteor/packages/mongo-livedata/45bb567dec/npm/node_modules/mongodb/lib/mongodb/connection/connection.js:478:10)
W2047-00:56:09.705(0)? (STDERR) at Socket.EventEmitter.emit (events.js:95:17)
W2047-00:56:09.705(0)? (STDERR) at net.js:441:14
W2047-00:56:09.706(0)? (STDERR) at process._tickCallback (node.js:415:13)
=> Exited with code: 8
=> Your application is crashing. Waiting for file change.
I checked in the the IRC room but they hadn't heard of the problem before.
TL;DR:
I create a new app:
meteor create newApp
I change into the new directory and run the app:
cd newApp
meteor
Everything works fine.
I kill the app, and add two smart-packages to my app:
meteor add accounts-ui
meteor add accounts-twitter
-(also tried accounts-facebook, same results).
I start the app - and it crashes.
Info:
Running a 32-bit distribution of Arch.
HDD space is fine.
RAM usage is about 1GB of 3GB before starting app - don't see any spikes.
Nothing seems to be bound to port 3002, checked using netstat.
Tried manually running mongod before starting app - no change.
Tried creating multiple projects - no change.
Removed ~/.meteor, reinstalled meteor, started a new project - no change.
Basically - I'm stumped. Seeing that I haven't actually written any code at all, I'm kinda blaming this on something else.
And since the guys in the IRC channel didn't see anything wrong with those steps, I'm also blaming it on something else then the tutorial.
Any ideas?
Best regards,
Víðir
For formalities, I'll place it here then.
Try restarting the PC
There is something using port 3002 and is not releasing it or Meteor just can't use port 3002 for some reason. If you can't manage to get hold of what's holding port 3002, then restarting the PC should do.
I had the similar problem with the latest Meteor 1.0 installation on my OS X 10.9: any application crashed after adding ui-accounts. In my case some other libs were involved and simple restart had no effect. What I had to do is completely remove Meteor and then install it again.
rm -rf ~/.meteor
rm -rf /usr/local/bin/
curl https://install.meteor.com/ | sh

Resources