Explore all Meteor open source software, libraries, packages, source code, cloud functions and APIs.

Popular New Releases in Meteor

wekan

v6.18

nosqlclient

4.0.1

meteor-autoform

v7.0.0

Meteor-Files

v2.0.1

meteor-collection2

3.4.0

Popular Libraries in Meteor

meteor

by meteor doticonjavascriptdoticon

star image 42855 doticonNOASSERTION

Meteor, the JavaScript App Platform

wekan

by wekan doticonjavascriptdoticon

star image 17929 doticonMIT

The Open Source kanban (built with Meteor). Keep variable/table/field names camelCase. For translations, only add Pull Request changes to wekan/i18n/en.i18n.json , other translations are done at https://transifex.com/wekan/wekan only.

Vulcan

by VulcanJS doticonjavascriptdoticon

star image 8020 doticonMIT

🌋 A toolkit to quickly build apps with React, GraphQL & Meteor

mist

by ethereum doticonjavascriptdoticon

star image 7347 doticonGPL-3.0

[DEPRECATED] Mist. Browse and use Ðapps on the Ethereum network.

nosqlclient

by nosqlclient doticonjavascriptdoticon

star image 3339 doticonAGPL-3.0

Cross-platform and self hosted, easy to use, intuitive mongodb management tool - Formerly Mongoclient

meteor-up-legacy

by arunoda doticonjavascriptdoticon

star image 2307 doticonMIT

Production Quality Meteor Deployments

Bootstrap-Form-Builder

by minikomi doticonjavascriptdoticon

star image 2120 doticonMIT

Web app for drag drop building bootstrap forms.

iron-router

by iron-meteor doticonjavascriptdoticon

star image 2008 doticonMIT

A client and server side router designed specifically for Meteor.

software-development-kit

by clinical-meteor doticonshelldoticon

star image 1664 doticon

FDA, HIPPA, and HL7 compliant Javascript/Node applications!

Trending New libraries in Meteor

vulcan-next

by VulcanJS doticonjavascriptdoticon

star image 300 doticonMIT

The Next starter for GraphQL developers

laravel-stats

by spatie doticonphpdoticon

star image 236 doticonMIT

Easily track application stats like orders, subscriptions and users and their change over time

rocon

by uhyo doticontypescriptdoticon

star image 226 doticonMIT

Router Library with Ultimate Type Safety

simplQ-frontend

by SimplQ doticonjavascriptdoticon

star image 139 doticonGPL-3.0

Modern and fully web based free queue management open source software.

meteor-devtools-evolved

by leonardoventurini doticonjavascriptdoticon

star image 116 doticonMIT

The Meteor framework development tool belt, evolved.

periqles

by oslabs-beta doticonjavascriptdoticon

star image 110 doticonMIT

React form library for Relay and Apollo

meteor-rejects

by AntiCope doticonjavadoticon

star image 105 doticon

An addon to Meteor Client that features that won't be added to Meteor. Because they were either rejected or are ports from other clients.

meteor-emails

by catin-black doticonjavascriptdoticon

star image 71 doticonMIT

Send cold emails for free! Completely free and open source project to fight against sales stagnation in your company

caprivacy

by caprivacy doticonhtmldoticon

star image 62 doticonMIT

California Consumer Privacy Directory

Top Authors in Meteor

1

meteor

35 Libraries

star icon47148

2

awatson1978

32 Libraries

star icon432

3

arunoda

25 Libraries

star icon3640

4

juliancwirko

25 Libraries

star icon853

5

veliovgroup

25 Libraries

star icon1469

6

dburles

25 Libraries

star icon1158

7

Meteor-Community-Packages

24 Libraries

star icon5371

8

vazco

23 Libraries

star icon1826

9

thespacedojo

18 Libraries

star icon219

10

Urigo

18 Libraries

star icon1299

1

35 Libraries

star icon47148

2

32 Libraries

star icon432

3

25 Libraries

star icon3640

4

25 Libraries

star icon853

5

25 Libraries

star icon1469

6

25 Libraries

star icon1158

7

24 Libraries

star icon5371

8

23 Libraries

star icon1826

9

18 Libraries

star icon219

10

18 Libraries

star icon1299

Trending Kits in Meteor

No Trending Kits are available at this moment for Meteor

Trending Discussions on Meteor

R - Converting Coordinates to Countries? (Large quantity)

Meteor build fails when run back to back

What is the use for the special "public" folder in a Meteor app?

Meteor + Semantic React

How to await future in global main dart of flutter?

Tone.PitchShift and Howler.js issues

How to access attributes [e.g. time] of terra raster in R?

Collection update Meteor failure from failed regex validation but no regex

Meteor global version is different than project's

Typescript - Extending existing module declarations

QUESTION

R - Converting Coordinates to Countries? (Large quantity)

Asked 2022-Apr-15 at 20:05

I have a data set that includes meteorite landings. It is really cool to see, but it only has coordinates for location data: latitude, longitude, and another variable that includes both of those in a coordinate format.

Is there a way I can convert these into a new variable for the country in which they are located? I have heard of geonames, but that only does one at a time, and I am looking at over 30,000 locations (haha). I could also potentially use a function to go through it, but I've heard it will run into errors with points in the ocean, which there are some here.

My goal here is to create a cartogram. If I can do that with the coordinates instead of making the country names for the entire world, please let me know.

Any help with this is appreciated.

The data set can be downloaded at https://www.kaggle.com/datasets/nasa/meteorite-landings, and the code can be filtered with this code:

1meteor.original <- read_csv("meteorite-landings.csv")
2meteor <- meteor.original %>%
3  filter(year >= 860 & year <= 2016) %>%
4  filter(reclong >= -180 & reclong <= 180 & (reclat != 0 | reclong != 0))
5head(meteor)
6

ANSWER

Answered 2022-Apr-15 at 20:05

Although it's possible to do this with several different online APIs, the free reverse geocoding APIs tend to handle only one point at a time, and a large data frame like yours could take hours to work through.

I would be tempted to use an R package with country info and map the points to countries using sf or sp.

The following function returns a vector of country names given a vector of latitudes and a vector of longitudes:

1meteor.original <- read_csv("meteorite-landings.csv")
2meteor <- meteor.original %>%
3  filter(year >= 860 & year <= 2016) %>%
4  filter(reclong >= -180 & reclong <= 180 & (reclat != 0 | reclong != 0))
5head(meteor)
6get_countries <-  function(long, lat)
7{ 
8  points <- cbind(long, lat)
9  countriesSP <- rworldmap::getMap(resolution = 'low')
10  pointsSP = sp::SpatialPoints(points, sp::CRS(sp::proj4string(countriesSP)))  
11  sp::over(pointsSP, countriesSP)$ADMIN
12}
13

So your code could be something like:

1meteor.original <- read_csv("meteorite-landings.csv")
2meteor <- meteor.original %>%
3  filter(year >= 860 & year <= 2016) %>%
4  filter(reclong >= -180 & reclong <= 180 & (reclat != 0 | reclong != 0))
5head(meteor)
6get_countries <-  function(long, lat)
7{ 
8  points <- cbind(long, lat)
9  countriesSP <- rworldmap::getMap(resolution = 'low')
10  pointsSP = sp::SpatialPoints(points, sp::CRS(sp::proj4string(countriesSP)))  
11  sp::over(pointsSP, countriesSP)$ADMIN
12}
13library(tidyverse)
14
15meteor.original <- read_csv("../meteorite-landings.csv")
16
17# Get meteor counts per country
18meteor <- meteor.original %>%
19  filter(year >= 860 & year <= 2016) %>%
20  filter(reclong >= -180 & reclong <= 180 & (reclat != 0 | reclong != 0)) %>%
21  mutate(latitude = as.numeric(gsub("^\\((.*), .*$", "\\1", GeoLocation)),
22         longitude = as.numeric(gsub("^.*, (.*)\\)$", "\\1", GeoLocation)),
23         country = get_countries(longitude, latitude)) %>%
24  group_by(country) %>%
25  count()
26
27# Get a world map, left join the meteor counts and plot
28sf::st_as_sf(rworldmap::getMap(res = "li")) %>%
29  rename(country = ADMIN.1) %>%
30  left_join(meteor, by = "country") %>%
31  ggplot() +
32  geom_sf(aes(fill = log(n)), colour = NA) +
33  scale_fill_viridis_c(na.value = "black", 
34                       breaks = log(c(1, 10, 100, 1000, 20000)),
35                       labels = exp,
36                       name = "Meteorite\nCount") +
37  theme_void()
38

enter image description here

Source https://stackoverflow.com/questions/71887566

QUESTION

Meteor build fails when run back to back

Asked 2022-Mar-23 at 02:22

I'm trying to learn about the Meteor build process to improve it's performance for my dockerized Meteor app. I'm finding that if I run meteor build build --directory --server-only twice, back to back, I get an error about not being able to parse json on the second run.

Here's the successful first run:

1 ❯❯❯ meteor build build --directory --server-only
2
3WARNING: The output directory is under your source tree.
4         Your generated files may get interpreted as source code!
5         Consider building into a different directory instead
6         meteor build ../output
7
8WARNING: npm peer requirements (for juliancwirko:postcss) not installed:
9 - postcss@8.2.6 installed, postcss@^7.0.0 needed
10 - postcss-load-config@3.0.1 installed, postcss-load-config@^2.1.0 needed
11
12Read more about installing npm peer dependencies:
13  http://guide.meteor.com/using-packages.html#peer-npm-dependencies
14
15   Minifying app stylesheet                  /
16  Replace Autoprefixer browsers option to Browserslist config.
17  Use browserslist key in package.json or .browserslistrc file.
18
19  Using browsers option can cause errors. Browserslist config can
20  be used for Babel, Autoprefixer, postcss-normalize and other tools.
21
22  If you really need to use option, rename it to overrideBrowserslist.
23                                                                                                                                                                                                              Learn more at:
24  https://github.com/browserslist/browserslist#readme
25  https://twitter.com/browserslist
26
27
28Browserslist: caniuse-lite is outdated. Please run:
29npx browserslist@latest --update-db
30Why you should do it regularly:
31https://github.com/browserslist/browserslist#browsers-data-updating
32Browserslist: caniuse-lite is outdated. Please run:
33npx browserslist@latest --update-db
34   Minifying app code                        \
35

and here's the unsuccessful second run. Note that I didn't do anything inbetween runs:

1 ❯❯❯ meteor build build --directory --server-only
2
3WARNING: The output directory is under your source tree.
4         Your generated files may get interpreted as source code!
5         Consider building into a different directory instead
6         meteor build ../output
7
8WARNING: npm peer requirements (for juliancwirko:postcss) not installed:
9 - postcss@8.2.6 installed, postcss@^7.0.0 needed
10 - postcss-load-config@3.0.1 installed, postcss-load-config@^2.1.0 needed
11
12Read more about installing npm peer dependencies:
13  http://guide.meteor.com/using-packages.html#peer-npm-dependencies
14
15   Minifying app stylesheet                  /
16  Replace Autoprefixer browsers option to Browserslist config.
17  Use browserslist key in package.json or .browserslistrc file.
18
19  Using browsers option can cause errors. Browserslist config can
20  be used for Babel, Autoprefixer, postcss-normalize and other tools.
21
22  If you really need to use option, rename it to overrideBrowserslist.
23                                                                                                                                                                                                              Learn more at:
24  https://github.com/browserslist/browserslist#readme
25  https://twitter.com/browserslist
26
27
28Browserslist: caniuse-lite is outdated. Please run:
29npx browserslist@latest --update-db
30Why you should do it regularly:
31https://github.com/browserslist/browserslist#browsers-data-updating
32Browserslist: caniuse-lite is outdated. Please run:
33npx browserslist@latest --update-db
34   Minifying app code                        \
35 ❯❯❯ meteor build build --directory --server-only
36WARNING: The output directory is under your source tree.
37         Your generated files may get interpreted as source code!
38         Consider building into a different directory instead
39         meteor build ../output
40
41WARNING: npm peer requirements (for juliancwirko:postcss) not installed:
42 - postcss@8.2.6 installed, postcss@^7.0.0 needed
43 - postcss-load-config@3.0.1 installed, postcss-load-config@^2.1.0 needed
44
45Read more about installing npm peer dependencies:
46  http://guide.meteor.com/using-packages.html#peer-npm-dependencies
47
48/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:
49218
50      throw error;
51      ^
52
53SyntaxError: Unexpected token u in JSON at position 1
54    at JSON.parse (<anonymous>)
55    at /home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/optimistic.ts:321:17
56    at wrap.makeCacheKey (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/optimistic.ts:36:
5715)
58    at recomputeNewValue (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimis
59m/src/entry.ts:182:31)
60    at Slot.withValue (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/@wry/conte
61xt/lib/context.js:73:29)
62    at reallyRecompute (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimism/
63src/entry.ts:165:19)
64    at Entry.recompute (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimism/
65src/entry.ts:85:9)
66    at optimistic (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimism/src/i
67ndex.ts:101:25)
68    at /home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/optimistic.ts:366:19
69    at recomputeNewValue (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimis
70m/src/entry.ts:182:31)
71    at Slot.withValue (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/@wry/conte
72xt/lib/context.js:73:29)
73    at reallyRecompute (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimism/
74src/entry.ts:165:19)
75    at Entry.recompute (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimism/
76src/entry.ts:85:9)
77    at optimistic (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimism/src/i
78ndex.ts:101:25)
79    at find (/tools/isobuild/package-source.js:1339:30)
80    at /tools/isobuild/package-source.js:1395:27
81    at Array.forEach (<anonymous>)
82    at find (/tools/isobuild/package-source.js:1374:22)
83    at find (/tools/isobuild/package-source.js:1406:25)
84    at /tools/isobuild/package-source.js:1395:27
85    at Array.forEach (<anonymous>)
86    at find (/tools/isobuild/package-source.js:1374:22)
87    at /tools/isobuild/package-source.js:1395:27
88    at Array.forEach (<anonymous>)
89    at find (/tools/isobuild/package-source.js:1374:22)
90    at /tools/isobuild/package-source.js:1395:27
91    at Array.forEach (<anonymous>)
92    at find (/tools/isobuild/package-source.js:1374:22)
93    at /tools/isobuild/package-source.js:1395:27
94    at Array.forEach (<anonymous>)
95    at find (/tools/isobuild/package-source.js:1374:22)
96    at /tools/isobuild/package-source.js:1395:27
97    at Array.forEach (<anonymous>)
98    at find (/tools/isobuild/package-source.js:1374:22)
99    at /tools/isobuild/package-source.js:1418:34
100    at Object.withCache (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/files.ts:1663:18)
101    at PackageSource._findSources (/tools/isobuild/package-source.js:1418:18)
102    at SourceArch.getFiles (/tools/isobuild/package-source.js:960:32)
103    at /tools/isobuild/compiler.js:406:23
104    at /tools/isobuild/compiler.js:186:28
105    at Object.withCache (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/files.ts:1663:18)
106    at /tools/isobuild/compiler.js:185:11
107    at Function._.each._.forEach (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules
108/underscore/underscore.js:186:9)
109    at Object.compile (/tools/isobuild/compiler.js:180:5)
110    at /tools/isobuild/bundler.js:3268:24
111    at Object.capture (/tools/utils/buildmessage.js:283:5)
112    at bundle (/tools/isobuild/bundler.js:3214:31)
113    at /tools/isobuild/bundler.js:3157:32
114    at Slot.withValue (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/@wry/conte
115xt/lib/context.js:73:29)
116    at Object.withCache (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/files.ts:1663:39)
117    at Object.bundle (/tools/isobuild/bundler.js:3157:16)
118    at buildCommand (/tools/cli/commands.js:1082:30)
119    at /tools/cli/commands.js:945:25
120    at Function.run (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/tool-env/tools/tool-env/profile.ts
121:289:14)
122    at /tools/cli/commands.js:943:18
123    at /home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.
124js:43:40
125 => awaited here:
126    at Promise.await (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-prom
127ise/promise_server.js:60:12)
128    at /tools/cli/main.js:1529:7
129

I've also tried doing the second run with a different directory output, but get the same result:

1 ❯❯❯ meteor build build --directory --server-only
2
3WARNING: The output directory is under your source tree.
4         Your generated files may get interpreted as source code!
5         Consider building into a different directory instead
6         meteor build ../output
7
8WARNING: npm peer requirements (for juliancwirko:postcss) not installed:
9 - postcss@8.2.6 installed, postcss@^7.0.0 needed
10 - postcss-load-config@3.0.1 installed, postcss-load-config@^2.1.0 needed
11
12Read more about installing npm peer dependencies:
13  http://guide.meteor.com/using-packages.html#peer-npm-dependencies
14
15   Minifying app stylesheet                  /
16  Replace Autoprefixer browsers option to Browserslist config.
17  Use browserslist key in package.json or .browserslistrc file.
18
19  Using browsers option can cause errors. Browserslist config can
20  be used for Babel, Autoprefixer, postcss-normalize and other tools.
21
22  If you really need to use option, rename it to overrideBrowserslist.
23                                                                                                                                                                                                              Learn more at:
24  https://github.com/browserslist/browserslist#readme
25  https://twitter.com/browserslist
26
27
28Browserslist: caniuse-lite is outdated. Please run:
29npx browserslist@latest --update-db
30Why you should do it regularly:
31https://github.com/browserslist/browserslist#browsers-data-updating
32Browserslist: caniuse-lite is outdated. Please run:
33npx browserslist@latest --update-db
34   Minifying app code                        \
35 ❯❯❯ meteor build build --directory --server-only
36WARNING: The output directory is under your source tree.
37         Your generated files may get interpreted as source code!
38         Consider building into a different directory instead
39         meteor build ../output
40
41WARNING: npm peer requirements (for juliancwirko:postcss) not installed:
42 - postcss@8.2.6 installed, postcss@^7.0.0 needed
43 - postcss-load-config@3.0.1 installed, postcss-load-config@^2.1.0 needed
44
45Read more about installing npm peer dependencies:
46  http://guide.meteor.com/using-packages.html#peer-npm-dependencies
47
48/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:
49218
50      throw error;
51      ^
52
53SyntaxError: Unexpected token u in JSON at position 1
54    at JSON.parse (<anonymous>)
55    at /home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/optimistic.ts:321:17
56    at wrap.makeCacheKey (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/optimistic.ts:36:
5715)
58    at recomputeNewValue (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimis
59m/src/entry.ts:182:31)
60    at Slot.withValue (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/@wry/conte
61xt/lib/context.js:73:29)
62    at reallyRecompute (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimism/
63src/entry.ts:165:19)
64    at Entry.recompute (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimism/
65src/entry.ts:85:9)
66    at optimistic (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimism/src/i
67ndex.ts:101:25)
68    at /home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/optimistic.ts:366:19
69    at recomputeNewValue (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimis
70m/src/entry.ts:182:31)
71    at Slot.withValue (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/@wry/conte
72xt/lib/context.js:73:29)
73    at reallyRecompute (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimism/
74src/entry.ts:165:19)
75    at Entry.recompute (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimism/
76src/entry.ts:85:9)
77    at optimistic (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimism/src/i
78ndex.ts:101:25)
79    at find (/tools/isobuild/package-source.js:1339:30)
80    at /tools/isobuild/package-source.js:1395:27
81    at Array.forEach (<anonymous>)
82    at find (/tools/isobuild/package-source.js:1374:22)
83    at find (/tools/isobuild/package-source.js:1406:25)
84    at /tools/isobuild/package-source.js:1395:27
85    at Array.forEach (<anonymous>)
86    at find (/tools/isobuild/package-source.js:1374:22)
87    at /tools/isobuild/package-source.js:1395:27
88    at Array.forEach (<anonymous>)
89    at find (/tools/isobuild/package-source.js:1374:22)
90    at /tools/isobuild/package-source.js:1395:27
91    at Array.forEach (<anonymous>)
92    at find (/tools/isobuild/package-source.js:1374:22)
93    at /tools/isobuild/package-source.js:1395:27
94    at Array.forEach (<anonymous>)
95    at find (/tools/isobuild/package-source.js:1374:22)
96    at /tools/isobuild/package-source.js:1395:27
97    at Array.forEach (<anonymous>)
98    at find (/tools/isobuild/package-source.js:1374:22)
99    at /tools/isobuild/package-source.js:1418:34
100    at Object.withCache (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/files.ts:1663:18)
101    at PackageSource._findSources (/tools/isobuild/package-source.js:1418:18)
102    at SourceArch.getFiles (/tools/isobuild/package-source.js:960:32)
103    at /tools/isobuild/compiler.js:406:23
104    at /tools/isobuild/compiler.js:186:28
105    at Object.withCache (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/files.ts:1663:18)
106    at /tools/isobuild/compiler.js:185:11
107    at Function._.each._.forEach (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules
108/underscore/underscore.js:186:9)
109    at Object.compile (/tools/isobuild/compiler.js:180:5)
110    at /tools/isobuild/bundler.js:3268:24
111    at Object.capture (/tools/utils/buildmessage.js:283:5)
112    at bundle (/tools/isobuild/bundler.js:3214:31)
113    at /tools/isobuild/bundler.js:3157:32
114    at Slot.withValue (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/@wry/conte
115xt/lib/context.js:73:29)
116    at Object.withCache (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/files.ts:1663:39)
117    at Object.bundle (/tools/isobuild/bundler.js:3157:16)
118    at buildCommand (/tools/cli/commands.js:1082:30)
119    at /tools/cli/commands.js:945:25
120    at Function.run (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/tool-env/tools/tool-env/profile.ts
121:289:14)
122    at /tools/cli/commands.js:943:18
123    at /home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.
124js:43:40
125 => awaited here:
126    at Promise.await (/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-prom
127ise/promise_server.js:60:12)
128    at /tools/cli/main.js:1529:7
129 ❯❯❯ meteor build .. --directory --server-only
130WARNING: npm peer requirements (for juliancwirko:postcss) not installed:
131 - postcss@8.2.6 installed, postcss@^7.0.0 needed
132 - postcss-load-config@3.0.1 installed, postcss-load-config@^2.1.0 needed
133
134Read more about installing npm peer dependencies:                                                                                                                                                             http://guide.meteor.com/using-packages.html#peer-npm-dependencies
135
136/home/paymahn1/.meteor/packages/meteor-tool/.2.1.0.udr5f0.57lxg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:
137218
138      throw error;
139      ^
140SyntaxError: Unexpected token u in JSON at position 1
141    at JSON.parse (<anonymous>)
142

Why does meteor fail to build if I try to build it twice back to back?

ANSWER

Answered 2022-Mar-23 at 02:22

What happens is that you produce your built app but not bundle it (using the --directory flag).

Therefore you have extra JS files in your file structure.

And in your attempts, they are mixed with your Meteor project structure, in a build folder (when you use command meteor build build --directory) or directly merged (meteor build .. --directory).

Therefore, on the next build run, Meteor picks these extra JS files as if they were part of your source code (eager loading), and fails, as suggested in the warning message:

The output directory is under your source tree. Your generated files may get interpreted as source code! Consider building into a different directory instead meteor build ../output

It would have worked in your next attempt if you had specified an explicit sibling build folder, instead of just the parent folder (which therefore puts files directly in your Meteor project root), e.g. meteor build ../siblingFolder

Another possible workaround is to use a build folder name starting with a dot ., so that Meteor ignores it on the next runs when it looks for source code, e.g. meteor build ./.build

See special directories docs:

The following directories are also not loaded as part of your app code:

  • Files/directories whose names start with a dot, like .meteor and .git

Source https://stackoverflow.com/questions/71577397

QUESTION

What is the use for the special "public" folder in a Meteor app?

Asked 2022-Mar-21 at 22:29

I'm currently using Meteor and trying to learn more about the framework. In the documentation about special directories the following is said about the public/ special directory:

All files inside a top-level directory called public/ are served as-is to the client. When referencing these assets, do not include public/ in the URL, write the URL as if they were all in the top level. For example, reference public/bg.png as <img src='/bg.png' />. This is the best place for favicon.ico, robots.txt, and similar files.

My question is: since I refer to files inside of public/ directory as if they were located in the root folder of my application, what's the different between putting the files in the public/ folder and in the root folder? Or is it just for organization sake?

Also the documentation I quoted above makes some examples using assets (some pngs and favicon.ico) and no JavaScript or HTML files. Am I able to put some JavaScript code in there and then import them in another file by referencing as if this code was located in the root of my app? Or is the public/ directory somewhat made only for assets?

I failed to find any docs that explains what is done to files inside this directory in detail (I only found what I quoted above). So if any documentation of that kind is available it would help a lot!

ANSWER

Answered 2022-Mar-21 at 20:08

unlike in Rails, Meteor initiatives don’t have a rigid document structure and you are quite a whole lot free to prepare your projects as you want. a few folder names but have unique which means, and documents within them will be dealt with in a different way. consumer files here will be loaded at the client simplest. files in that folder don’t need things like Meteor.isClient.

server Loaded on the server best, duh! No need for Meteor.isServer whilst files are in that folder, the client won’t see these files. public This directory is for property like photographs. on your initiatives, you reference stuff in the public folder as if they have been in the root folder. as an example, when you have a report: public/nude.jpg, then for your app you include it with . personal files only available at the server facet thru the assets API. checks documents in there received’t be loaded anywhere and are used for checking out your app. lib documents in that folder are loaded earlier than whatever else, which makes it the best listing to vicinity the distinct libraries used on a undertaking.

Source https://stackoverflow.com/questions/71563489

QUESTION

Meteor + Semantic React

Asked 2022-Mar-15 at 10:45
LAST EDIT :

never use npm raw command in meteor. always meteor npm. That is the reason why everything broke.

AND do upgrade step by step , version to the nearest version.

I think that's all that causes this headache.

Everything works now.

Thanks !

EDIT :

After trying all the steps ahead ... I remove jquery / less and semantic:ui from meteor

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4

added

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4meteor npm install @craco/craco @semantic-ui-react/craco-less --save-dev
5meteor npm install semantic-ui-less --save
6meteor npm install --save react react-dom semantic-ui-react
7

launch meteor

but the react-semantic-ui css files are not there

and :

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4meteor npm install @craco/craco @semantic-ui-react/craco-less --save-dev
5meteor npm install semantic-ui-less --save
6meteor npm install --save react react-dom semantic-ui-react
7meteor npm install                                            
8

returns

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4meteor npm install @craco/craco @semantic-ui-react/craco-less --save-dev
5meteor npm install semantic-ui-less --save
6meteor npm install --save react react-dom semantic-ui-react
7meteor npm install                                            
8npm WARN @craco/craco@6.4.3 requires a peer of react-scripts@^4.0.0 but none is installed. You must install peer dependencies yourself.
9npm WARN @semantic-ui-react/craco-less@2.0.2 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
10npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
11npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of cosmiconfig@&gt;=7 but none is installed. You must install peer dependencies yourself.
12npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of typescript@&gt;=3 but none is installed. You must install peer dependencies yourself.
13npm WARN craco-less@2.0.0 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
14npm WARN less-loader@7.3.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
15npm WARN ts-node@10.5.0 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
16npm WARN ts-node@10.5.0 requires a peer of typescript@&gt;=2.7 but none is installed. You must install peer dependencies yourself.
17

ORIGINAL QUESTION

I tried many things to make it work together but I am always stuck either with the

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4meteor npm install @craco/craco @semantic-ui-react/craco-less --save-dev
5meteor npm install semantic-ui-less --save
6meteor npm install --save react react-dom semantic-ui-react
7meteor npm install                                            
8npm WARN @craco/craco@6.4.3 requires a peer of react-scripts@^4.0.0 but none is installed. You must install peer dependencies yourself.
9npm WARN @semantic-ui-react/craco-less@2.0.2 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
10npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
11npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of cosmiconfig@&gt;=7 but none is installed. You must install peer dependencies yourself.
12npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of typescript@&gt;=3 but none is installed. You must install peer dependencies yourself.
13npm WARN craco-less@2.0.0 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
14npm WARN less-loader@7.3.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
15npm WARN ts-node@10.5.0 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
16npm WARN ts-node@10.5.0 requires a peer of typescript@&gt;=2.7 but none is installed. You must install peer dependencies yourself.
17Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
18

(I manually add prenthesis -> fixed, but it should work out of the box...)

then after

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4meteor npm install @craco/craco @semantic-ui-react/craco-less --save-dev
5meteor npm install semantic-ui-less --save
6meteor npm install --save react react-dom semantic-ui-react
7meteor npm install                                            
8npm WARN @craco/craco@6.4.3 requires a peer of react-scripts@^4.0.0 but none is installed. You must install peer dependencies yourself.
9npm WARN @semantic-ui-react/craco-less@2.0.2 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
10npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
11npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of cosmiconfig@&gt;=7 but none is installed. You must install peer dependencies yourself.
12npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of typescript@&gt;=3 but none is installed. You must install peer dependencies yourself.
13npm WARN craco-less@2.0.0 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
14npm WARN less-loader@7.3.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
15npm WARN ts-node@10.5.0 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
16npm WARN ts-node@10.5.0 requires a peer of typescript@&gt;=2.7 but none is installed. You must install peer dependencies yourself.
17Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
18   While processing files with less (for target web.browser.legacy):
19   client/lib/semantic-ui/definitions/globals/site.import.less:29:
20   variable @googleProtocol is undefined
21   error: variable @googleProtocol is undefined
22

Has someone there a "from scratch" method to create a Meteor project with semantic-ui working, please ?

Thanks

Here is all the steps (extended version) I have been through...

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4meteor npm install @craco/craco @semantic-ui-react/craco-less --save-dev
5meteor npm install semantic-ui-less --save
6meteor npm install --save react react-dom semantic-ui-react
7meteor npm install                                            
8npm WARN @craco/craco@6.4.3 requires a peer of react-scripts@^4.0.0 but none is installed. You must install peer dependencies yourself.
9npm WARN @semantic-ui-react/craco-less@2.0.2 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
10npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
11npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of cosmiconfig@&gt;=7 but none is installed. You must install peer dependencies yourself.
12npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of typescript@&gt;=3 but none is installed. You must install peer dependencies yourself.
13npm WARN craco-less@2.0.0 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
14npm WARN less-loader@7.3.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
15npm WARN ts-node@10.5.0 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
16npm WARN ts-node@10.5.0 requires a peer of typescript@&gt;=2.7 but none is installed. You must install peer dependencies yourself.
17Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
18   While processing files with less (for target web.browser.legacy):
19   client/lib/semantic-ui/definitions/globals/site.import.less:29:
20   variable @googleProtocol is undefined
21   error: variable @googleProtocol is undefined
22meteor create test
23cd test
24meteor add semantic:ui
25meteor remove standard-minifier-css
26meteor add less juliancwirko:postcss
27

added to package.json

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4meteor npm install @craco/craco @semantic-ui-react/craco-less --save-dev
5meteor npm install semantic-ui-less --save
6meteor npm install --save react react-dom semantic-ui-react
7meteor npm install                                            
8npm WARN @craco/craco@6.4.3 requires a peer of react-scripts@^4.0.0 but none is installed. You must install peer dependencies yourself.
9npm WARN @semantic-ui-react/craco-less@2.0.2 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
10npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
11npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of cosmiconfig@&gt;=7 but none is installed. You must install peer dependencies yourself.
12npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of typescript@&gt;=3 but none is installed. You must install peer dependencies yourself.
13npm WARN craco-less@2.0.0 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
14npm WARN less-loader@7.3.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
15npm WARN ts-node@10.5.0 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
16npm WARN ts-node@10.5.0 requires a peer of typescript@&gt;=2.7 but none is installed. You must install peer dependencies yourself.
17Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
18   While processing files with less (for target web.browser.legacy):
19   client/lib/semantic-ui/definitions/globals/site.import.less:29:
20   variable @googleProtocol is undefined
21   error: variable @googleProtocol is undefined
22meteor create test
23cd test
24meteor add semantic:ui
25meteor remove standard-minifier-css
26meteor add less juliancwirko:postcss
27{ &quot;devDependencies&quot;: { &quot;autoprefixer&quot;: &quot;^6.3.1&quot; }, &quot;postcss&quot;: { &quot;plugins&quot;: { &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]} } } }
28

then execute

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4meteor npm install @craco/craco @semantic-ui-react/craco-less --save-dev
5meteor npm install semantic-ui-less --save
6meteor npm install --save react react-dom semantic-ui-react
7meteor npm install                                            
8npm WARN @craco/craco@6.4.3 requires a peer of react-scripts@^4.0.0 but none is installed. You must install peer dependencies yourself.
9npm WARN @semantic-ui-react/craco-less@2.0.2 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
10npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
11npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of cosmiconfig@&gt;=7 but none is installed. You must install peer dependencies yourself.
12npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of typescript@&gt;=3 but none is installed. You must install peer dependencies yourself.
13npm WARN craco-less@2.0.0 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
14npm WARN less-loader@7.3.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
15npm WARN ts-node@10.5.0 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
16npm WARN ts-node@10.5.0 requires a peer of typescript@&gt;=2.7 but none is installed. You must install peer dependencies yourself.
17Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
18   While processing files with less (for target web.browser.legacy):
19   client/lib/semantic-ui/definitions/globals/site.import.less:29:
20   variable @googleProtocol is undefined
21   error: variable @googleProtocol is undefined
22meteor create test
23cd test
24meteor add semantic:ui
25meteor remove standard-minifier-css
26meteor add less juliancwirko:postcss
27{ &quot;devDependencies&quot;: { &quot;autoprefixer&quot;: &quot;^6.3.1&quot; }, &quot;postcss&quot;: { &quot;plugins&quot;: { &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]} } } }
28meteor npm install
29
30meteor npm install semantic-ui-react semantic-ui-css
31

Test the display by adding a buttons in App.jsx

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4meteor npm install @craco/craco @semantic-ui-react/craco-less --save-dev
5meteor npm install semantic-ui-less --save
6meteor npm install --save react react-dom semantic-ui-react
7meteor npm install                                            
8npm WARN @craco/craco@6.4.3 requires a peer of react-scripts@^4.0.0 but none is installed. You must install peer dependencies yourself.
9npm WARN @semantic-ui-react/craco-less@2.0.2 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
10npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
11npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of cosmiconfig@&gt;=7 but none is installed. You must install peer dependencies yourself.
12npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of typescript@&gt;=3 but none is installed. You must install peer dependencies yourself.
13npm WARN craco-less@2.0.0 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
14npm WARN less-loader@7.3.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
15npm WARN ts-node@10.5.0 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
16npm WARN ts-node@10.5.0 requires a peer of typescript@&gt;=2.7 but none is installed. You must install peer dependencies yourself.
17Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
18   While processing files with less (for target web.browser.legacy):
19   client/lib/semantic-ui/definitions/globals/site.import.less:29:
20   variable @googleProtocol is undefined
21   error: variable @googleProtocol is undefined
22meteor create test
23cd test
24meteor add semantic:ui
25meteor remove standard-minifier-css
26meteor add less juliancwirko:postcss
27{ &quot;devDependencies&quot;: { &quot;autoprefixer&quot;: &quot;^6.3.1&quot; }, &quot;postcss&quot;: { &quot;plugins&quot;: { &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]} } } }
28meteor npm install
29
30meteor npm install semantic-ui-react semantic-ui-css
31import React from 'react';
32import { Hello } from './Hello.jsx';
33import { Info } from './Info.jsx';
34import {Button} from &quot;semantic-ui-react&quot;;
35
36export const App = () =&gt; (
37  &lt;div&gt;
38    &lt;h1&gt;Welcome to Meteor!&lt;/h1&gt;
39      &lt;Button primary&gt;Primary&lt;/Button&gt;
40      &lt;Button secondary&gt;Secondary&lt;/Button&gt;
41    &lt;Hello/&gt;
42    &lt;Info/&gt;
43  &lt;/div&gt;
44);
45

then executing

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4meteor npm install @craco/craco @semantic-ui-react/craco-less --save-dev
5meteor npm install semantic-ui-less --save
6meteor npm install --save react react-dom semantic-ui-react
7meteor npm install                                            
8npm WARN @craco/craco@6.4.3 requires a peer of react-scripts@^4.0.0 but none is installed. You must install peer dependencies yourself.
9npm WARN @semantic-ui-react/craco-less@2.0.2 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
10npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
11npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of cosmiconfig@&gt;=7 but none is installed. You must install peer dependencies yourself.
12npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of typescript@&gt;=3 but none is installed. You must install peer dependencies yourself.
13npm WARN craco-less@2.0.0 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
14npm WARN less-loader@7.3.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
15npm WARN ts-node@10.5.0 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
16npm WARN ts-node@10.5.0 requires a peer of typescript@&gt;=2.7 but none is installed. You must install peer dependencies yourself.
17Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
18   While processing files with less (for target web.browser.legacy):
19   client/lib/semantic-ui/definitions/globals/site.import.less:29:
20   variable @googleProtocol is undefined
21   error: variable @googleProtocol is undefined
22meteor create test
23cd test
24meteor add semantic:ui
25meteor remove standard-minifier-css
26meteor add less juliancwirko:postcss
27{ &quot;devDependencies&quot;: { &quot;autoprefixer&quot;: &quot;^6.3.1&quot; }, &quot;postcss&quot;: { &quot;plugins&quot;: { &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]} } } }
28meteor npm install
29
30meteor npm install semantic-ui-react semantic-ui-css
31import React from 'react';
32import { Hello } from './Hello.jsx';
33import { Info } from './Info.jsx';
34import {Button} from &quot;semantic-ui-react&quot;;
35
36export const App = () =&gt; (
37  &lt;div&gt;
38    &lt;h1&gt;Welcome to Meteor!&lt;/h1&gt;
39      &lt;Button primary&gt;Primary&lt;/Button&gt;
40      &lt;Button secondary&gt;Secondary&lt;/Button&gt;
41    &lt;Hello/&gt;
42    &lt;Info/&gt;
43  &lt;/div&gt;
44);
45meteor
46

but css not applied ...

Read https://github.com/Semantic-Org/Semantic-UI-Meteor and added

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4meteor npm install @craco/craco @semantic-ui-react/craco-less --save-dev
5meteor npm install semantic-ui-less --save
6meteor npm install --save react react-dom semantic-ui-react
7meteor npm install                                            
8npm WARN @craco/craco@6.4.3 requires a peer of react-scripts@^4.0.0 but none is installed. You must install peer dependencies yourself.
9npm WARN @semantic-ui-react/craco-less@2.0.2 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
10npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
11npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of cosmiconfig@&gt;=7 but none is installed. You must install peer dependencies yourself.
12npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of typescript@&gt;=3 but none is installed. You must install peer dependencies yourself.
13npm WARN craco-less@2.0.0 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
14npm WARN less-loader@7.3.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
15npm WARN ts-node@10.5.0 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
16npm WARN ts-node@10.5.0 requires a peer of typescript@&gt;=2.7 but none is installed. You must install peer dependencies yourself.
17Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
18   While processing files with less (for target web.browser.legacy):
19   client/lib/semantic-ui/definitions/globals/site.import.less:29:
20   variable @googleProtocol is undefined
21   error: variable @googleProtocol is undefined
22meteor create test
23cd test
24meteor add semantic:ui
25meteor remove standard-minifier-css
26meteor add less juliancwirko:postcss
27{ &quot;devDependencies&quot;: { &quot;autoprefixer&quot;: &quot;^6.3.1&quot; }, &quot;postcss&quot;: { &quot;plugins&quot;: { &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]} } } }
28meteor npm install
29
30meteor npm install semantic-ui-react semantic-ui-css
31import React from 'react';
32import { Hello } from './Hello.jsx';
33import { Info } from './Info.jsx';
34import {Button} from &quot;semantic-ui-react&quot;;
35
36export const App = () =&gt; (
37  &lt;div&gt;
38    &lt;h1&gt;Welcome to Meteor!&lt;/h1&gt;
39      &lt;Button primary&gt;Primary&lt;/Button&gt;
40      &lt;Button secondary&gt;Secondary&lt;/Button&gt;
41    &lt;Hello/&gt;
42    &lt;Info/&gt;
43  &lt;/div&gt;
44);
45meteor
46{
47  &quot;devDependencies&quot;: {
48    &quot;autoprefixer&quot;: &quot;^6.3.1&quot;,
49    &quot;postcss&quot;: &quot;^6.0.22&quot;,
50    &quot;postcss-load-config&quot;: &quot;^1.2.0&quot;
51  },
52  &quot;postcss&quot;: {
53    &quot;plugins&quot;: {
54      &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]}
55    }
56  }
57}
58

then delete .custom.semantic.json

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4meteor npm install @craco/craco @semantic-ui-react/craco-less --save-dev
5meteor npm install semantic-ui-less --save
6meteor npm install --save react react-dom semantic-ui-react
7meteor npm install                                            
8npm WARN @craco/craco@6.4.3 requires a peer of react-scripts@^4.0.0 but none is installed. You must install peer dependencies yourself.
9npm WARN @semantic-ui-react/craco-less@2.0.2 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
10npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
11npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of cosmiconfig@&gt;=7 but none is installed. You must install peer dependencies yourself.
12npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of typescript@&gt;=3 but none is installed. You must install peer dependencies yourself.
13npm WARN craco-less@2.0.0 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
14npm WARN less-loader@7.3.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
15npm WARN ts-node@10.5.0 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
16npm WARN ts-node@10.5.0 requires a peer of typescript@&gt;=2.7 but none is installed. You must install peer dependencies yourself.
17Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
18   While processing files with less (for target web.browser.legacy):
19   client/lib/semantic-ui/definitions/globals/site.import.less:29:
20   variable @googleProtocol is undefined
21   error: variable @googleProtocol is undefined
22meteor create test
23cd test
24meteor add semantic:ui
25meteor remove standard-minifier-css
26meteor add less juliancwirko:postcss
27{ &quot;devDependencies&quot;: { &quot;autoprefixer&quot;: &quot;^6.3.1&quot; }, &quot;postcss&quot;: { &quot;plugins&quot;: { &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]} } } }
28meteor npm install
29
30meteor npm install semantic-ui-react semantic-ui-css
31import React from 'react';
32import { Hello } from './Hello.jsx';
33import { Info } from './Info.jsx';
34import {Button} from &quot;semantic-ui-react&quot;;
35
36export const App = () =&gt; (
37  &lt;div&gt;
38    &lt;h1&gt;Welcome to Meteor!&lt;/h1&gt;
39      &lt;Button primary&gt;Primary&lt;/Button&gt;
40      &lt;Button secondary&gt;Secondary&lt;/Button&gt;
41    &lt;Hello/&gt;
42    &lt;Info/&gt;
43  &lt;/div&gt;
44);
45meteor
46{
47  &quot;devDependencies&quot;: {
48    &quot;autoprefixer&quot;: &quot;^6.3.1&quot;,
49    &quot;postcss&quot;: &quot;^6.0.22&quot;,
50    &quot;postcss-load-config&quot;: &quot;^1.2.0&quot;
51  },
52  &quot;postcss&quot;: {
53    &quot;plugins&quot;: {
54      &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]}
55    }
56  }
57}
58meteor npm install
59

set

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4meteor npm install @craco/craco @semantic-ui-react/craco-less --save-dev
5meteor npm install semantic-ui-less --save
6meteor npm install --save react react-dom semantic-ui-react
7meteor npm install                                            
8npm WARN @craco/craco@6.4.3 requires a peer of react-scripts@^4.0.0 but none is installed. You must install peer dependencies yourself.
9npm WARN @semantic-ui-react/craco-less@2.0.2 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
10npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
11npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of cosmiconfig@&gt;=7 but none is installed. You must install peer dependencies yourself.
12npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of typescript@&gt;=3 but none is installed. You must install peer dependencies yourself.
13npm WARN craco-less@2.0.0 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
14npm WARN less-loader@7.3.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
15npm WARN ts-node@10.5.0 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
16npm WARN ts-node@10.5.0 requires a peer of typescript@&gt;=2.7 but none is installed. You must install peer dependencies yourself.
17Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
18   While processing files with less (for target web.browser.legacy):
19   client/lib/semantic-ui/definitions/globals/site.import.less:29:
20   variable @googleProtocol is undefined
21   error: variable @googleProtocol is undefined
22meteor create test
23cd test
24meteor add semantic:ui
25meteor remove standard-minifier-css
26meteor add less juliancwirko:postcss
27{ &quot;devDependencies&quot;: { &quot;autoprefixer&quot;: &quot;^6.3.1&quot; }, &quot;postcss&quot;: { &quot;plugins&quot;: { &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]} } } }
28meteor npm install
29
30meteor npm install semantic-ui-react semantic-ui-css
31import React from 'react';
32import { Hello } from './Hello.jsx';
33import { Info } from './Info.jsx';
34import {Button} from &quot;semantic-ui-react&quot;;
35
36export const App = () =&gt; (
37  &lt;div&gt;
38    &lt;h1&gt;Welcome to Meteor!&lt;/h1&gt;
39      &lt;Button primary&gt;Primary&lt;/Button&gt;
40      &lt;Button secondary&gt;Secondary&lt;/Button&gt;
41    &lt;Hello/&gt;
42    &lt;Info/&gt;
43  &lt;/div&gt;
44);
45meteor
46{
47  &quot;devDependencies&quot;: {
48    &quot;autoprefixer&quot;: &quot;^6.3.1&quot;,
49    &quot;postcss&quot;: &quot;^6.0.22&quot;,
50    &quot;postcss-load-config&quot;: &quot;^1.2.0&quot;
51  },
52  &quot;postcss&quot;: {
53    &quot;plugins&quot;: {
54      &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]}
55    }
56  }
57}
58meteor npm install
59&quot;basic&quot;: true, 
60

in custom.semantic.json

and again

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4meteor npm install @craco/craco @semantic-ui-react/craco-less --save-dev
5meteor npm install semantic-ui-less --save
6meteor npm install --save react react-dom semantic-ui-react
7meteor npm install                                            
8npm WARN @craco/craco@6.4.3 requires a peer of react-scripts@^4.0.0 but none is installed. You must install peer dependencies yourself.
9npm WARN @semantic-ui-react/craco-less@2.0.2 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
10npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
11npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of cosmiconfig@&gt;=7 but none is installed. You must install peer dependencies yourself.
12npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of typescript@&gt;=3 but none is installed. You must install peer dependencies yourself.
13npm WARN craco-less@2.0.0 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
14npm WARN less-loader@7.3.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
15npm WARN ts-node@10.5.0 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
16npm WARN ts-node@10.5.0 requires a peer of typescript@&gt;=2.7 but none is installed. You must install peer dependencies yourself.
17Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
18   While processing files with less (for target web.browser.legacy):
19   client/lib/semantic-ui/definitions/globals/site.import.less:29:
20   variable @googleProtocol is undefined
21   error: variable @googleProtocol is undefined
22meteor create test
23cd test
24meteor add semantic:ui
25meteor remove standard-minifier-css
26meteor add less juliancwirko:postcss
27{ &quot;devDependencies&quot;: { &quot;autoprefixer&quot;: &quot;^6.3.1&quot; }, &quot;postcss&quot;: { &quot;plugins&quot;: { &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]} } } }
28meteor npm install
29
30meteor npm install semantic-ui-react semantic-ui-css
31import React from 'react';
32import { Hello } from './Hello.jsx';
33import { Info } from './Info.jsx';
34import {Button} from &quot;semantic-ui-react&quot;;
35
36export const App = () =&gt; (
37  &lt;div&gt;
38    &lt;h1&gt;Welcome to Meteor!&lt;/h1&gt;
39      &lt;Button primary&gt;Primary&lt;/Button&gt;
40      &lt;Button secondary&gt;Secondary&lt;/Button&gt;
41    &lt;Hello/&gt;
42    &lt;Info/&gt;
43  &lt;/div&gt;
44);
45meteor
46{
47  &quot;devDependencies&quot;: {
48    &quot;autoprefixer&quot;: &quot;^6.3.1&quot;,
49    &quot;postcss&quot;: &quot;^6.0.22&quot;,
50    &quot;postcss-load-config&quot;: &quot;^1.2.0&quot;
51  },
52  &quot;postcss&quot;: {
53    &quot;plugins&quot;: {
54      &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]}
55    }
56  }
57}
58meteor npm install
59&quot;basic&quot;: true, 
60meteor
61

still no semantic-ui-react in the display

semantic css is not in the browser inspector :/

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4meteor npm install @craco/craco @semantic-ui-react/craco-less --save-dev
5meteor npm install semantic-ui-less --save
6meteor npm install --save react react-dom semantic-ui-react
7meteor npm install                                            
8npm WARN @craco/craco@6.4.3 requires a peer of react-scripts@^4.0.0 but none is installed. You must install peer dependencies yourself.
9npm WARN @semantic-ui-react/craco-less@2.0.2 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
10npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
11npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of cosmiconfig@&gt;=7 but none is installed. You must install peer dependencies yourself.
12npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of typescript@&gt;=3 but none is installed. You must install peer dependencies yourself.
13npm WARN craco-less@2.0.0 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
14npm WARN less-loader@7.3.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
15npm WARN ts-node@10.5.0 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
16npm WARN ts-node@10.5.0 requires a peer of typescript@&gt;=2.7 but none is installed. You must install peer dependencies yourself.
17Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
18   While processing files with less (for target web.browser.legacy):
19   client/lib/semantic-ui/definitions/globals/site.import.less:29:
20   variable @googleProtocol is undefined
21   error: variable @googleProtocol is undefined
22meteor create test
23cd test
24meteor add semantic:ui
25meteor remove standard-minifier-css
26meteor add less juliancwirko:postcss
27{ &quot;devDependencies&quot;: { &quot;autoprefixer&quot;: &quot;^6.3.1&quot; }, &quot;postcss&quot;: { &quot;plugins&quot;: { &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]} } } }
28meteor npm install
29
30meteor npm install semantic-ui-react semantic-ui-css
31import React from 'react';
32import { Hello } from './Hello.jsx';
33import { Info } from './Info.jsx';
34import {Button} from &quot;semantic-ui-react&quot;;
35
36export const App = () =&gt; (
37  &lt;div&gt;
38    &lt;h1&gt;Welcome to Meteor!&lt;/h1&gt;
39      &lt;Button primary&gt;Primary&lt;/Button&gt;
40      &lt;Button secondary&gt;Secondary&lt;/Button&gt;
41    &lt;Hello/&gt;
42    &lt;Info/&gt;
43  &lt;/div&gt;
44);
45meteor
46{
47  &quot;devDependencies&quot;: {
48    &quot;autoprefixer&quot;: &quot;^6.3.1&quot;,
49    &quot;postcss&quot;: &quot;^6.0.22&quot;,
50    &quot;postcss-load-config&quot;: &quot;^1.2.0&quot;
51  },
52  &quot;postcss&quot;: {
53    &quot;plugins&quot;: {
54      &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]}
55    }
56  }
57}
58meteor npm install
59&quot;basic&quot;: true, 
60meteor
61meteor add less jquery
62

then again

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4meteor npm install @craco/craco @semantic-ui-react/craco-less --save-dev
5meteor npm install semantic-ui-less --save
6meteor npm install --save react react-dom semantic-ui-react
7meteor npm install                                            
8npm WARN @craco/craco@6.4.3 requires a peer of react-scripts@^4.0.0 but none is installed. You must install peer dependencies yourself.
9npm WARN @semantic-ui-react/craco-less@2.0.2 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
10npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
11npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of cosmiconfig@&gt;=7 but none is installed. You must install peer dependencies yourself.
12npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of typescript@&gt;=3 but none is installed. You must install peer dependencies yourself.
13npm WARN craco-less@2.0.0 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
14npm WARN less-loader@7.3.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
15npm WARN ts-node@10.5.0 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
16npm WARN ts-node@10.5.0 requires a peer of typescript@&gt;=2.7 but none is installed. You must install peer dependencies yourself.
17Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
18   While processing files with less (for target web.browser.legacy):
19   client/lib/semantic-ui/definitions/globals/site.import.less:29:
20   variable @googleProtocol is undefined
21   error: variable @googleProtocol is undefined
22meteor create test
23cd test
24meteor add semantic:ui
25meteor remove standard-minifier-css
26meteor add less juliancwirko:postcss
27{ &quot;devDependencies&quot;: { &quot;autoprefixer&quot;: &quot;^6.3.1&quot; }, &quot;postcss&quot;: { &quot;plugins&quot;: { &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]} } } }
28meteor npm install
29
30meteor npm install semantic-ui-react semantic-ui-css
31import React from 'react';
32import { Hello } from './Hello.jsx';
33import { Info } from './Info.jsx';
34import {Button} from &quot;semantic-ui-react&quot;;
35
36export const App = () =&gt; (
37  &lt;div&gt;
38    &lt;h1&gt;Welcome to Meteor!&lt;/h1&gt;
39      &lt;Button primary&gt;Primary&lt;/Button&gt;
40      &lt;Button secondary&gt;Secondary&lt;/Button&gt;
41    &lt;Hello/&gt;
42    &lt;Info/&gt;
43  &lt;/div&gt;
44);
45meteor
46{
47  &quot;devDependencies&quot;: {
48    &quot;autoprefixer&quot;: &quot;^6.3.1&quot;,
49    &quot;postcss&quot;: &quot;^6.0.22&quot;,
50    &quot;postcss-load-config&quot;: &quot;^1.2.0&quot;
51  },
52  &quot;postcss&quot;: {
53    &quot;plugins&quot;: {
54      &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]}
55    }
56  }
57}
58meteor npm install
59&quot;basic&quot;: true, 
60meteor
61meteor add less jquery
62meteor
63

HERE IS THE FIRST ERROR :

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4meteor npm install @craco/craco @semantic-ui-react/craco-less --save-dev
5meteor npm install semantic-ui-less --save
6meteor npm install --save react react-dom semantic-ui-react
7meteor npm install                                            
8npm WARN @craco/craco@6.4.3 requires a peer of react-scripts@^4.0.0 but none is installed. You must install peer dependencies yourself.
9npm WARN @semantic-ui-react/craco-less@2.0.2 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
10npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
11npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of cosmiconfig@&gt;=7 but none is installed. You must install peer dependencies yourself.
12npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of typescript@&gt;=3 but none is installed. You must install peer dependencies yourself.
13npm WARN craco-less@2.0.0 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
14npm WARN less-loader@7.3.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
15npm WARN ts-node@10.5.0 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
16npm WARN ts-node@10.5.0 requires a peer of typescript@&gt;=2.7 but none is installed. You must install peer dependencies yourself.
17Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
18   While processing files with less (for target web.browser.legacy):
19   client/lib/semantic-ui/definitions/globals/site.import.less:29:
20   variable @googleProtocol is undefined
21   error: variable @googleProtocol is undefined
22meteor create test
23cd test
24meteor add semantic:ui
25meteor remove standard-minifier-css
26meteor add less juliancwirko:postcss
27{ &quot;devDependencies&quot;: { &quot;autoprefixer&quot;: &quot;^6.3.1&quot; }, &quot;postcss&quot;: { &quot;plugins&quot;: { &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]} } } }
28meteor npm install
29
30meteor npm install semantic-ui-react semantic-ui-css
31import React from 'react';
32import { Hello } from './Hello.jsx';
33import { Info } from './Info.jsx';
34import {Button} from &quot;semantic-ui-react&quot;;
35
36export const App = () =&gt; (
37  &lt;div&gt;
38    &lt;h1&gt;Welcome to Meteor!&lt;/h1&gt;
39      &lt;Button primary&gt;Primary&lt;/Button&gt;
40      &lt;Button secondary&gt;Secondary&lt;/Button&gt;
41    &lt;Hello/&gt;
42    &lt;Info/&gt;
43  &lt;/div&gt;
44);
45meteor
46{
47  &quot;devDependencies&quot;: {
48    &quot;autoprefixer&quot;: &quot;^6.3.1&quot;,
49    &quot;postcss&quot;: &quot;^6.0.22&quot;,
50    &quot;postcss-load-config&quot;: &quot;^1.2.0&quot;
51  },
52  &quot;postcss&quot;: {
53    &quot;plugins&quot;: {
54      &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]}
55    }
56  }
57}
58meteor npm install
59&quot;basic&quot;: true, 
60meteor
61meteor add less jquery
62meteor
63While processing files with less (for target web.browser):
64client/lib/semantic-ui/themes/default/globals/site.variables.import.less:412:19: 
65Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
66error: Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
67

let's fix it manually... by adding parenthesis...

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4meteor npm install @craco/craco @semantic-ui-react/craco-less --save-dev
5meteor npm install semantic-ui-less --save
6meteor npm install --save react react-dom semantic-ui-react
7meteor npm install                                            
8npm WARN @craco/craco@6.4.3 requires a peer of react-scripts@^4.0.0 but none is installed. You must install peer dependencies yourself.
9npm WARN @semantic-ui-react/craco-less@2.0.2 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
10npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
11npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of cosmiconfig@&gt;=7 but none is installed. You must install peer dependencies yourself.
12npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of typescript@&gt;=3 but none is installed. You must install peer dependencies yourself.
13npm WARN craco-less@2.0.0 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
14npm WARN less-loader@7.3.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
15npm WARN ts-node@10.5.0 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
16npm WARN ts-node@10.5.0 requires a peer of typescript@&gt;=2.7 but none is installed. You must install peer dependencies yourself.
17Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
18   While processing files with less (for target web.browser.legacy):
19   client/lib/semantic-ui/definitions/globals/site.import.less:29:
20   variable @googleProtocol is undefined
21   error: variable @googleProtocol is undefined
22meteor create test
23cd test
24meteor add semantic:ui
25meteor remove standard-minifier-css
26meteor add less juliancwirko:postcss
27{ &quot;devDependencies&quot;: { &quot;autoprefixer&quot;: &quot;^6.3.1&quot; }, &quot;postcss&quot;: { &quot;plugins&quot;: { &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]} } } }
28meteor npm install
29
30meteor npm install semantic-ui-react semantic-ui-css
31import React from 'react';
32import { Hello } from './Hello.jsx';
33import { Info } from './Info.jsx';
34import {Button} from &quot;semantic-ui-react&quot;;
35
36export const App = () =&gt; (
37  &lt;div&gt;
38    &lt;h1&gt;Welcome to Meteor!&lt;/h1&gt;
39      &lt;Button primary&gt;Primary&lt;/Button&gt;
40      &lt;Button secondary&gt;Secondary&lt;/Button&gt;
41    &lt;Hello/&gt;
42    &lt;Info/&gt;
43  &lt;/div&gt;
44);
45meteor
46{
47  &quot;devDependencies&quot;: {
48    &quot;autoprefixer&quot;: &quot;^6.3.1&quot;,
49    &quot;postcss&quot;: &quot;^6.0.22&quot;,
50    &quot;postcss-load-config&quot;: &quot;^1.2.0&quot;
51  },
52  &quot;postcss&quot;: {
53    &quot;plugins&quot;: {
54      &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]}
55    }
56  }
57}
58meteor npm install
59&quot;basic&quot;: true, 
60meteor
61meteor add less jquery
62meteor
63While processing files with less (for target web.browser):
64client/lib/semantic-ui/themes/default/globals/site.variables.import.less:412:19: 
65Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
66error: Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
67@mini            : unit( (round(@miniSize * @emSize) / @emSize), rem);
68@tiny            : unit( (round(@tinySize * @emSize) / @emSize), rem);
69@small           : unit( (round(@smallSize * @emSize) / @emSize), rem);
70@medium          : unit( (round(@mediumSize * @emSize) / @emSize), rem);
71@large           : unit( (round(@largeSize * @emSize) / @emSize), rem);
72@big             : unit( (round(@bigSize * @emSize) / @emSize), rem);
73@huge            : unit( (round(@hugeSize * @emSize) / @emSize), rem);
74@massive         : unit( (round(@massiveSize * @emSize) / @emSize), rem);
75
76/* em */
77@relativeMini    : unit( (round(@miniSize * @emSize) / @emSize), em);
78@relativeTiny    : unit( (round(@tinySize * @emSize) / @emSize), em);
79@relativeSmall   : unit( (round(@smallSize * @emSize) / @emSize), em);
80@relativeMedium  : unit( (round(@mediumSize * @emSize) / @emSize), em);
81@relativeLarge   : unit( (round(@largeSize * @emSize) / @emSize), em);
82@relativeBig     : unit( (round(@bigSize * @emSize) / @emSize), em);
83@relativeHuge    : unit( (round(@hugeSize * @emSize) / @emSize), em);
84@relativeMassive : unit( (round(@massiveSize * @emSize) / @emSize), em);
85
86/* rem */
87@absoluteMini    : unit( (round(@miniSize * @emSize) / @emSize), rem);
88@absoluteTiny    : unit( (round(@tinySize * @emSize) / @emSize), rem);
89@absoluteSmall   : unit( (round(@smallSize * @emSize) / @emSize), rem);
90@absoluteMedium  : unit( (round(@mediumSize * @emSize) / @emSize), rem);
91@absoluteLarge   : unit( (round(@largeSize * @emSize) / @emSize), rem);
92@absoluteBig     : unit( (round(@bigSize * @emSize) / @emSize), rem);
93@absoluteHuge    : unit( (round(@hugeSize * @emSize) / @emSize), rem);
94@absoluteMassive : unit( (round(@massiveSize * @emSize) / @emSize), rem);
95

next try

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4meteor npm install @craco/craco @semantic-ui-react/craco-less --save-dev
5meteor npm install semantic-ui-less --save
6meteor npm install --save react react-dom semantic-ui-react
7meteor npm install                                            
8npm WARN @craco/craco@6.4.3 requires a peer of react-scripts@^4.0.0 but none is installed. You must install peer dependencies yourself.
9npm WARN @semantic-ui-react/craco-less@2.0.2 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
10npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
11npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of cosmiconfig@&gt;=7 but none is installed. You must install peer dependencies yourself.
12npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of typescript@&gt;=3 but none is installed. You must install peer dependencies yourself.
13npm WARN craco-less@2.0.0 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
14npm WARN less-loader@7.3.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
15npm WARN ts-node@10.5.0 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
16npm WARN ts-node@10.5.0 requires a peer of typescript@&gt;=2.7 but none is installed. You must install peer dependencies yourself.
17Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
18   While processing files with less (for target web.browser.legacy):
19   client/lib/semantic-ui/definitions/globals/site.import.less:29:
20   variable @googleProtocol is undefined
21   error: variable @googleProtocol is undefined
22meteor create test
23cd test
24meteor add semantic:ui
25meteor remove standard-minifier-css
26meteor add less juliancwirko:postcss
27{ &quot;devDependencies&quot;: { &quot;autoprefixer&quot;: &quot;^6.3.1&quot; }, &quot;postcss&quot;: { &quot;plugins&quot;: { &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]} } } }
28meteor npm install
29
30meteor npm install semantic-ui-react semantic-ui-css
31import React from 'react';
32import { Hello } from './Hello.jsx';
33import { Info } from './Info.jsx';
34import {Button} from &quot;semantic-ui-react&quot;;
35
36export const App = () =&gt; (
37  &lt;div&gt;
38    &lt;h1&gt;Welcome to Meteor!&lt;/h1&gt;
39      &lt;Button primary&gt;Primary&lt;/Button&gt;
40      &lt;Button secondary&gt;Secondary&lt;/Button&gt;
41    &lt;Hello/&gt;
42    &lt;Info/&gt;
43  &lt;/div&gt;
44);
45meteor
46{
47  &quot;devDependencies&quot;: {
48    &quot;autoprefixer&quot;: &quot;^6.3.1&quot;,
49    &quot;postcss&quot;: &quot;^6.0.22&quot;,
50    &quot;postcss-load-config&quot;: &quot;^1.2.0&quot;
51  },
52  &quot;postcss&quot;: {
53    &quot;plugins&quot;: {
54      &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]}
55    }
56  }
57}
58meteor npm install
59&quot;basic&quot;: true, 
60meteor
61meteor add less jquery
62meteor
63While processing files with less (for target web.browser):
64client/lib/semantic-ui/themes/default/globals/site.variables.import.less:412:19: 
65Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
66error: Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
67@mini            : unit( (round(@miniSize * @emSize) / @emSize), rem);
68@tiny            : unit( (round(@tinySize * @emSize) / @emSize), rem);
69@small           : unit( (round(@smallSize * @emSize) / @emSize), rem);
70@medium          : unit( (round(@mediumSize * @emSize) / @emSize), rem);
71@large           : unit( (round(@largeSize * @emSize) / @emSize), rem);
72@big             : unit( (round(@bigSize * @emSize) / @emSize), rem);
73@huge            : unit( (round(@hugeSize * @emSize) / @emSize), rem);
74@massive         : unit( (round(@massiveSize * @emSize) / @emSize), rem);
75
76/* em */
77@relativeMini    : unit( (round(@miniSize * @emSize) / @emSize), em);
78@relativeTiny    : unit( (round(@tinySize * @emSize) / @emSize), em);
79@relativeSmall   : unit( (round(@smallSize * @emSize) / @emSize), em);
80@relativeMedium  : unit( (round(@mediumSize * @emSize) / @emSize), em);
81@relativeLarge   : unit( (round(@largeSize * @emSize) / @emSize), em);
82@relativeBig     : unit( (round(@bigSize * @emSize) / @emSize), em);
83@relativeHuge    : unit( (round(@hugeSize * @emSize) / @emSize), em);
84@relativeMassive : unit( (round(@massiveSize * @emSize) / @emSize), em);
85
86/* rem */
87@absoluteMini    : unit( (round(@miniSize * @emSize) / @emSize), rem);
88@absoluteTiny    : unit( (round(@tinySize * @emSize) / @emSize), rem);
89@absoluteSmall   : unit( (round(@smallSize * @emSize) / @emSize), rem);
90@absoluteMedium  : unit( (round(@mediumSize * @emSize) / @emSize), rem);
91@absoluteLarge   : unit( (round(@largeSize * @emSize) / @emSize), rem);
92@absoluteBig     : unit( (round(@bigSize * @emSize) / @emSize), rem);
93@absoluteHuge    : unit( (round(@hugeSize * @emSize) / @emSize), rem);
94@absoluteMassive : unit( (round(@massiveSize * @emSize) / @emSize), rem);
95meteor 
96

but

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4meteor npm install @craco/craco @semantic-ui-react/craco-less --save-dev
5meteor npm install semantic-ui-less --save
6meteor npm install --save react react-dom semantic-ui-react
7meteor npm install                                            
8npm WARN @craco/craco@6.4.3 requires a peer of react-scripts@^4.0.0 but none is installed. You must install peer dependencies yourself.
9npm WARN @semantic-ui-react/craco-less@2.0.2 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
10npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
11npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of cosmiconfig@&gt;=7 but none is installed. You must install peer dependencies yourself.
12npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of typescript@&gt;=3 but none is installed. You must install peer dependencies yourself.
13npm WARN craco-less@2.0.0 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
14npm WARN less-loader@7.3.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
15npm WARN ts-node@10.5.0 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
16npm WARN ts-node@10.5.0 requires a peer of typescript@&gt;=2.7 but none is installed. You must install peer dependencies yourself.
17Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
18   While processing files with less (for target web.browser.legacy):
19   client/lib/semantic-ui/definitions/globals/site.import.less:29:
20   variable @googleProtocol is undefined
21   error: variable @googleProtocol is undefined
22meteor create test
23cd test
24meteor add semantic:ui
25meteor remove standard-minifier-css
26meteor add less juliancwirko:postcss
27{ &quot;devDependencies&quot;: { &quot;autoprefixer&quot;: &quot;^6.3.1&quot; }, &quot;postcss&quot;: { &quot;plugins&quot;: { &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]} } } }
28meteor npm install
29
30meteor npm install semantic-ui-react semantic-ui-css
31import React from 'react';
32import { Hello } from './Hello.jsx';
33import { Info } from './Info.jsx';
34import {Button} from &quot;semantic-ui-react&quot;;
35
36export const App = () =&gt; (
37  &lt;div&gt;
38    &lt;h1&gt;Welcome to Meteor!&lt;/h1&gt;
39      &lt;Button primary&gt;Primary&lt;/Button&gt;
40      &lt;Button secondary&gt;Secondary&lt;/Button&gt;
41    &lt;Hello/&gt;
42    &lt;Info/&gt;
43  &lt;/div&gt;
44);
45meteor
46{
47  &quot;devDependencies&quot;: {
48    &quot;autoprefixer&quot;: &quot;^6.3.1&quot;,
49    &quot;postcss&quot;: &quot;^6.0.22&quot;,
50    &quot;postcss-load-config&quot;: &quot;^1.2.0&quot;
51  },
52  &quot;postcss&quot;: {
53    &quot;plugins&quot;: {
54      &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]}
55    }
56  }
57}
58meteor npm install
59&quot;basic&quot;: true, 
60meteor
61meteor add less jquery
62meteor
63While processing files with less (for target web.browser):
64client/lib/semantic-ui/themes/default/globals/site.variables.import.less:412:19: 
65Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
66error: Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
67@mini            : unit( (round(@miniSize * @emSize) / @emSize), rem);
68@tiny            : unit( (round(@tinySize * @emSize) / @emSize), rem);
69@small           : unit( (round(@smallSize * @emSize) / @emSize), rem);
70@medium          : unit( (round(@mediumSize * @emSize) / @emSize), rem);
71@large           : unit( (round(@largeSize * @emSize) / @emSize), rem);
72@big             : unit( (round(@bigSize * @emSize) / @emSize), rem);
73@huge            : unit( (round(@hugeSize * @emSize) / @emSize), rem);
74@massive         : unit( (round(@massiveSize * @emSize) / @emSize), rem);
75
76/* em */
77@relativeMini    : unit( (round(@miniSize * @emSize) / @emSize), em);
78@relativeTiny    : unit( (round(@tinySize * @emSize) / @emSize), em);
79@relativeSmall   : unit( (round(@smallSize * @emSize) / @emSize), em);
80@relativeMedium  : unit( (round(@mediumSize * @emSize) / @emSize), em);
81@relativeLarge   : unit( (round(@largeSize * @emSize) / @emSize), em);
82@relativeBig     : unit( (round(@bigSize * @emSize) / @emSize), em);
83@relativeHuge    : unit( (round(@hugeSize * @emSize) / @emSize), em);
84@relativeMassive : unit( (round(@massiveSize * @emSize) / @emSize), em);
85
86/* rem */
87@absoluteMini    : unit( (round(@miniSize * @emSize) / @emSize), rem);
88@absoluteTiny    : unit( (round(@tinySize * @emSize) / @emSize), rem);
89@absoluteSmall   : unit( (round(@smallSize * @emSize) / @emSize), rem);
90@absoluteMedium  : unit( (round(@mediumSize * @emSize) / @emSize), rem);
91@absoluteLarge   : unit( (round(@largeSize * @emSize) / @emSize), rem);
92@absoluteBig     : unit( (round(@bigSize * @emSize) / @emSize), rem);
93@absoluteHuge    : unit( (round(@hugeSize * @emSize) / @emSize), rem);
94@absoluteMassive : unit( (round(@massiveSize * @emSize) / @emSize), rem);
95meteor 
96client/lib/semantic-ui/definitions/globals/site.import.less:29: variable @googleProtocol is undefined
97

error: variable @googleProtocol is undefined

lets modify it manually... and retry... but :

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4meteor npm install @craco/craco @semantic-ui-react/craco-less --save-dev
5meteor npm install semantic-ui-less --save
6meteor npm install --save react react-dom semantic-ui-react
7meteor npm install                                            
8npm WARN @craco/craco@6.4.3 requires a peer of react-scripts@^4.0.0 but none is installed. You must install peer dependencies yourself.
9npm WARN @semantic-ui-react/craco-less@2.0.2 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
10npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
11npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of cosmiconfig@&gt;=7 but none is installed. You must install peer dependencies yourself.
12npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of typescript@&gt;=3 but none is installed. You must install peer dependencies yourself.
13npm WARN craco-less@2.0.0 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
14npm WARN less-loader@7.3.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
15npm WARN ts-node@10.5.0 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
16npm WARN ts-node@10.5.0 requires a peer of typescript@&gt;=2.7 but none is installed. You must install peer dependencies yourself.
17Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
18   While processing files with less (for target web.browser.legacy):
19   client/lib/semantic-ui/definitions/globals/site.import.less:29:
20   variable @googleProtocol is undefined
21   error: variable @googleProtocol is undefined
22meteor create test
23cd test
24meteor add semantic:ui
25meteor remove standard-minifier-css
26meteor add less juliancwirko:postcss
27{ &quot;devDependencies&quot;: { &quot;autoprefixer&quot;: &quot;^6.3.1&quot; }, &quot;postcss&quot;: { &quot;plugins&quot;: { &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]} } } }
28meteor npm install
29
30meteor npm install semantic-ui-react semantic-ui-css
31import React from 'react';
32import { Hello } from './Hello.jsx';
33import { Info } from './Info.jsx';
34import {Button} from &quot;semantic-ui-react&quot;;
35
36export const App = () =&gt; (
37  &lt;div&gt;
38    &lt;h1&gt;Welcome to Meteor!&lt;/h1&gt;
39      &lt;Button primary&gt;Primary&lt;/Button&gt;
40      &lt;Button secondary&gt;Secondary&lt;/Button&gt;
41    &lt;Hello/&gt;
42    &lt;Info/&gt;
43  &lt;/div&gt;
44);
45meteor
46{
47  &quot;devDependencies&quot;: {
48    &quot;autoprefixer&quot;: &quot;^6.3.1&quot;,
49    &quot;postcss&quot;: &quot;^6.0.22&quot;,
50    &quot;postcss-load-config&quot;: &quot;^1.2.0&quot;
51  },
52  &quot;postcss&quot;: {
53    &quot;plugins&quot;: {
54      &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]}
55    }
56  }
57}
58meteor npm install
59&quot;basic&quot;: true, 
60meteor
61meteor add less jquery
62meteor
63While processing files with less (for target web.browser):
64client/lib/semantic-ui/themes/default/globals/site.variables.import.less:412:19: 
65Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
66error: Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
67@mini            : unit( (round(@miniSize * @emSize) / @emSize), rem);
68@tiny            : unit( (round(@tinySize * @emSize) / @emSize), rem);
69@small           : unit( (round(@smallSize * @emSize) / @emSize), rem);
70@medium          : unit( (round(@mediumSize * @emSize) / @emSize), rem);
71@large           : unit( (round(@largeSize * @emSize) / @emSize), rem);
72@big             : unit( (round(@bigSize * @emSize) / @emSize), rem);
73@huge            : unit( (round(@hugeSize * @emSize) / @emSize), rem);
74@massive         : unit( (round(@massiveSize * @emSize) / @emSize), rem);
75
76/* em */
77@relativeMini    : unit( (round(@miniSize * @emSize) / @emSize), em);
78@relativeTiny    : unit( (round(@tinySize * @emSize) / @emSize), em);
79@relativeSmall   : unit( (round(@smallSize * @emSize) / @emSize), em);
80@relativeMedium  : unit( (round(@mediumSize * @emSize) / @emSize), em);
81@relativeLarge   : unit( (round(@largeSize * @emSize) / @emSize), em);
82@relativeBig     : unit( (round(@bigSize * @emSize) / @emSize), em);
83@relativeHuge    : unit( (round(@hugeSize * @emSize) / @emSize), em);
84@relativeMassive : unit( (round(@massiveSize * @emSize) / @emSize), em);
85
86/* rem */
87@absoluteMini    : unit( (round(@miniSize * @emSize) / @emSize), rem);
88@absoluteTiny    : unit( (round(@tinySize * @emSize) / @emSize), rem);
89@absoluteSmall   : unit( (round(@smallSize * @emSize) / @emSize), rem);
90@absoluteMedium  : unit( (round(@mediumSize * @emSize) / @emSize), rem);
91@absoluteLarge   : unit( (round(@largeSize * @emSize) / @emSize), rem);
92@absoluteBig     : unit( (round(@bigSize * @emSize) / @emSize), rem);
93@absoluteHuge    : unit( (round(@hugeSize * @emSize) / @emSize), rem);
94@absoluteMassive : unit( (round(@massiveSize * @emSize) / @emSize), rem);
95meteor 
96client/lib/semantic-ui/definitions/globals/site.import.less:29: variable @googleProtocol is undefined
97client/lib/semantic-ui/definitions/globals/site.import.less:29: variable @googleFontRequest is undefined
98error: variable @googleFontRequest is undefined
99

There must be something to do, I am getting crazy or ?

Thanks !

ANSWER

Answered 2022-Feb-28 at 21:21

I think you have created a bit of a mess for yourself. I was able to create a simple meteor app using semantic-ui-react as follows:

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4meteor npm install @craco/craco @semantic-ui-react/craco-less --save-dev
5meteor npm install semantic-ui-less --save
6meteor npm install --save react react-dom semantic-ui-react
7meteor npm install                                            
8npm WARN @craco/craco@6.4.3 requires a peer of react-scripts@^4.0.0 but none is installed. You must install peer dependencies yourself.
9npm WARN @semantic-ui-react/craco-less@2.0.2 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
10npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
11npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of cosmiconfig@&gt;=7 but none is installed. You must install peer dependencies yourself.
12npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of typescript@&gt;=3 but none is installed. You must install peer dependencies yourself.
13npm WARN craco-less@2.0.0 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
14npm WARN less-loader@7.3.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
15npm WARN ts-node@10.5.0 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
16npm WARN ts-node@10.5.0 requires a peer of typescript@&gt;=2.7 but none is installed. You must install peer dependencies yourself.
17Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
18   While processing files with less (for target web.browser.legacy):
19   client/lib/semantic-ui/definitions/globals/site.import.less:29:
20   variable @googleProtocol is undefined
21   error: variable @googleProtocol is undefined
22meteor create test
23cd test
24meteor add semantic:ui
25meteor remove standard-minifier-css
26meteor add less juliancwirko:postcss
27{ &quot;devDependencies&quot;: { &quot;autoprefixer&quot;: &quot;^6.3.1&quot; }, &quot;postcss&quot;: { &quot;plugins&quot;: { &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]} } } }
28meteor npm install
29
30meteor npm install semantic-ui-react semantic-ui-css
31import React from 'react';
32import { Hello } from './Hello.jsx';
33import { Info } from './Info.jsx';
34import {Button} from &quot;semantic-ui-react&quot;;
35
36export const App = () =&gt; (
37  &lt;div&gt;
38    &lt;h1&gt;Welcome to Meteor!&lt;/h1&gt;
39      &lt;Button primary&gt;Primary&lt;/Button&gt;
40      &lt;Button secondary&gt;Secondary&lt;/Button&gt;
41    &lt;Hello/&gt;
42    &lt;Info/&gt;
43  &lt;/div&gt;
44);
45meteor
46{
47  &quot;devDependencies&quot;: {
48    &quot;autoprefixer&quot;: &quot;^6.3.1&quot;,
49    &quot;postcss&quot;: &quot;^6.0.22&quot;,
50    &quot;postcss-load-config&quot;: &quot;^1.2.0&quot;
51  },
52  &quot;postcss&quot;: {
53    &quot;plugins&quot;: {
54      &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]}
55    }
56  }
57}
58meteor npm install
59&quot;basic&quot;: true, 
60meteor
61meteor add less jquery
62meteor
63While processing files with less (for target web.browser):
64client/lib/semantic-ui/themes/default/globals/site.variables.import.less:412:19: 
65Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
66error: Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
67@mini            : unit( (round(@miniSize * @emSize) / @emSize), rem);
68@tiny            : unit( (round(@tinySize * @emSize) / @emSize), rem);
69@small           : unit( (round(@smallSize * @emSize) / @emSize), rem);
70@medium          : unit( (round(@mediumSize * @emSize) / @emSize), rem);
71@large           : unit( (round(@largeSize * @emSize) / @emSize), rem);
72@big             : unit( (round(@bigSize * @emSize) / @emSize), rem);
73@huge            : unit( (round(@hugeSize * @emSize) / @emSize), rem);
74@massive         : unit( (round(@massiveSize * @emSize) / @emSize), rem);
75
76/* em */
77@relativeMini    : unit( (round(@miniSize * @emSize) / @emSize), em);
78@relativeTiny    : unit( (round(@tinySize * @emSize) / @emSize), em);
79@relativeSmall   : unit( (round(@smallSize * @emSize) / @emSize), em);
80@relativeMedium  : unit( (round(@mediumSize * @emSize) / @emSize), em);
81@relativeLarge   : unit( (round(@largeSize * @emSize) / @emSize), em);
82@relativeBig     : unit( (round(@bigSize * @emSize) / @emSize), em);
83@relativeHuge    : unit( (round(@hugeSize * @emSize) / @emSize), em);
84@relativeMassive : unit( (round(@massiveSize * @emSize) / @emSize), em);
85
86/* rem */
87@absoluteMini    : unit( (round(@miniSize * @emSize) / @emSize), rem);
88@absoluteTiny    : unit( (round(@tinySize * @emSize) / @emSize), rem);
89@absoluteSmall   : unit( (round(@smallSize * @emSize) / @emSize), rem);
90@absoluteMedium  : unit( (round(@mediumSize * @emSize) / @emSize), rem);
91@absoluteLarge   : unit( (round(@largeSize * @emSize) / @emSize), rem);
92@absoluteBig     : unit( (round(@bigSize * @emSize) / @emSize), rem);
93@absoluteHuge    : unit( (round(@hugeSize * @emSize) / @emSize), rem);
94@absoluteMassive : unit( (round(@massiveSize * @emSize) / @emSize), rem);
95meteor 
96client/lib/semantic-ui/definitions/globals/site.import.less:29: variable @googleProtocol is undefined
97client/lib/semantic-ui/definitions/globals/site.import.less:29: variable @googleFontRequest is undefined
98error: variable @googleFontRequest is undefined
99meteor create mySemanticTest
100cd mySemanticTest
101meteor npm install --save react react-dom semantic-ui-react semantic-ui-css
102meteor
103

Then I edited App.jsx to be:

1meteor remove semantic:ui
2meteor remove jquery less  
3meteor npm uninstall semantic-ui semantic-ui-css   
4meteor npm install @craco/craco @semantic-ui-react/craco-less --save-dev
5meteor npm install semantic-ui-less --save
6meteor npm install --save react react-dom semantic-ui-react
7meteor npm install                                            
8npm WARN @craco/craco@6.4.3 requires a peer of react-scripts@^4.0.0 but none is installed. You must install peer dependencies yourself.
9npm WARN @semantic-ui-react/craco-less@2.0.2 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
10npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
11npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of cosmiconfig@&gt;=7 but none is installed. You must install peer dependencies yourself.
12npm WARN cosmiconfig-typescript-loader@1.0.5 requires a peer of typescript@&gt;=3 but none is installed. You must install peer dependencies yourself.
13npm WARN craco-less@2.0.0 requires a peer of react-scripts@^5.0.0 but none is installed. You must install peer dependencies yourself.
14npm WARN less-loader@7.3.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
15npm WARN ts-node@10.5.0 requires a peer of @types/node@* but none is installed. You must install peer dependencies yourself.
16npm WARN ts-node@10.5.0 requires a peer of typescript@&gt;=2.7 but none is installed. You must install peer dependencies yourself.
17Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
18   While processing files with less (for target web.browser.legacy):
19   client/lib/semantic-ui/definitions/globals/site.import.less:29:
20   variable @googleProtocol is undefined
21   error: variable @googleProtocol is undefined
22meteor create test
23cd test
24meteor add semantic:ui
25meteor remove standard-minifier-css
26meteor add less juliancwirko:postcss
27{ &quot;devDependencies&quot;: { &quot;autoprefixer&quot;: &quot;^6.3.1&quot; }, &quot;postcss&quot;: { &quot;plugins&quot;: { &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]} } } }
28meteor npm install
29
30meteor npm install semantic-ui-react semantic-ui-css
31import React from 'react';
32import { Hello } from './Hello.jsx';
33import { Info } from './Info.jsx';
34import {Button} from &quot;semantic-ui-react&quot;;
35
36export const App = () =&gt; (
37  &lt;div&gt;
38    &lt;h1&gt;Welcome to Meteor!&lt;/h1&gt;
39      &lt;Button primary&gt;Primary&lt;/Button&gt;
40      &lt;Button secondary&gt;Secondary&lt;/Button&gt;
41    &lt;Hello/&gt;
42    &lt;Info/&gt;
43  &lt;/div&gt;
44);
45meteor
46{
47  &quot;devDependencies&quot;: {
48    &quot;autoprefixer&quot;: &quot;^6.3.1&quot;,
49    &quot;postcss&quot;: &quot;^6.0.22&quot;,
50    &quot;postcss-load-config&quot;: &quot;^1.2.0&quot;
51  },
52  &quot;postcss&quot;: {
53    &quot;plugins&quot;: {
54      &quot;autoprefixer&quot;: {&quot;browsers&quot;: [&quot;last 2 versions&quot;]}
55    }
56  }
57}
58meteor npm install
59&quot;basic&quot;: true, 
60meteor
61meteor add less jquery
62meteor
63While processing files with less (for target web.browser):
64client/lib/semantic-ui/themes/default/globals/site.variables.import.less:412:19: 
65Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
66error: Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
67@mini            : unit( (round(@miniSize * @emSize) / @emSize), rem);
68@tiny            : unit( (round(@tinySize * @emSize) / @emSize), rem);
69@small           : unit( (round(@smallSize * @emSize) / @emSize), rem);
70@medium          : unit( (round(@mediumSize * @emSize) / @emSize), rem);
71@large           : unit( (round(@largeSize * @emSize) / @emSize), rem);
72@big             : unit( (round(@bigSize * @emSize) / @emSize), rem);
73@huge            : unit( (round(@hugeSize * @emSize) / @emSize), rem);
74@massive         : unit( (round(@massiveSize * @emSize) / @emSize), rem);
75
76/* em */
77@relativeMini    : unit( (round(@miniSize * @emSize) / @emSize), em);
78@relativeTiny    : unit( (round(@tinySize * @emSize) / @emSize), em);
79@relativeSmall   : unit( (round(@smallSize * @emSize) / @emSize), em);
80@relativeMedium  : unit( (round(@mediumSize * @emSize) / @emSize), em);
81@relativeLarge   : unit( (round(@largeSize * @emSize) / @emSize), em);
82@relativeBig     : unit( (round(@bigSize * @emSize) / @emSize), em);
83@relativeHuge    : unit( (round(@hugeSize * @emSize) / @emSize), em);
84@relativeMassive : unit( (round(@massiveSize * @emSize) / @emSize), em);
85
86/* rem */
87@absoluteMini    : unit( (round(@miniSize * @emSize) / @emSize), rem);
88@absoluteTiny    : unit( (round(@tinySize * @emSize) / @emSize), rem);
89@absoluteSmall   : unit( (round(@smallSize * @emSize) / @emSize), rem);
90@absoluteMedium  : unit( (round(@mediumSize * @emSize) / @emSize), rem);
91@absoluteLarge   : unit( (round(@largeSize * @emSize) / @emSize), rem);
92@absoluteBig     : unit( (round(@bigSize * @emSize) / @emSize), rem);
93@absoluteHuge    : unit( (round(@hugeSize * @emSize) / @emSize), rem);
94@absoluteMassive : unit( (round(@massiveSize * @emSize) / @emSize), rem);
95meteor 
96client/lib/semantic-ui/definitions/globals/site.import.less:29: variable @googleProtocol is undefined
97client/lib/semantic-ui/definitions/globals/site.import.less:29: variable @googleFontRequest is undefined
98error: variable @googleFontRequest is undefined
99meteor create mySemanticTest
100cd mySemanticTest
101meteor npm install --save react react-dom semantic-ui-react semantic-ui-css
102meteor
103import React from 'react';
104
105import 'semantic-ui-css/semantic.min.css'
106import { Button } from 'semantic-ui-react'
107
108export const App = () =&gt; (
109  &lt;div&gt;
110    &lt;h1&gt;Welcome to Meteor!&lt;/h1&gt;
111
112    &lt;Button&gt;This works&lt;/Button&gt;
113  &lt;/div&gt;
114);
115

And it all worked and looked right:

enter image description here

Source https://stackoverflow.com/questions/71262062

QUESTION

How to await future in global main dart of flutter?

Asked 2022-Mar-12 at 10:12

I using dart_meteor package

and it must be initiated in global scope main.dart

like this

1import 'package:flutter/material.dart';
2import 'package:dart_meteor/dart_meteor.dart';
3import 'package:http/http.dart' as http;
4import 'dart:convert';
5
6Future getUrl2() async {
7  Uri myUrl = Uri.http('myurl.id', '/geturl.php');
8
9  try {
10    http.Response response = await http.get(myUrl );
11    return response.body;
12  } catch (e) {
13    throw (e);
14  }
15}
16
17MeteorClient meteor = MeteorClient.connect(url: getUrl());
18
19getUrl() async {
20  String url = await getUrl2();
21  return url;
22}
23
24void main() {
25  runApp(const MyApp());
26}
27

and it got error:

_TypeError (type 'Future<dynamic>' is not a subtype of type 'String')

from the documentation this package https://pub.dev/packages/dart_meteor must be

First, create an instance of MeteorClient in your app global scope so that it can be used anywhere in your project.

I need to call to server using static api, about newest version url

but I got error like this

so how to await http call (or synced http call) in main dart?

ANSWER

Answered 2022-Mar-09 at 10:04

Code:

1import 'package:flutter/material.dart';
2import 'package:dart_meteor/dart_meteor.dart';
3import 'package:http/http.dart' as http;
4import 'dart:convert';
5
6Future getUrl2() async {
7  Uri myUrl = Uri.http('myurl.id', '/geturl.php');
8
9  try {
10    http.Response response = await http.get(myUrl );
11    return response.body;
12  } catch (e) {
13    throw (e);
14  }
15}
16
17MeteorClient meteor = MeteorClient.connect(url: getUrl());
18
19getUrl() async {
20  String url = await getUrl2();
21  return url;
22}
23
24void main() {
25  runApp(const MyApp());
26}
27  class YourGlobalClass {
28    Future&lt;String&gt; getUrl2() async {
29      Uri myUrl = Uri.http('myurl.id', '/geturl.php');
30
31      try {
32        http.Response response = await http.get(myUrl);
33        return response.body;
34      } catch (e) {
35        throw (e);
36      }
37    }
38
39    Future&lt;MeteorClient&gt; meteor() async {
40      final meteor = MeteorClient.connect(url: await getUrl());
41      return meteor;
42    }
43
44    Future&lt;String&gt; getUrl() async {
45      String url = await getUrl2();
46      return url;
47    }
48  }
49

use:

1import 'package:flutter/material.dart';
2import 'package:dart_meteor/dart_meteor.dart';
3import 'package:http/http.dart' as http;
4import 'dart:convert';
5
6Future getUrl2() async {
7  Uri myUrl = Uri.http('myurl.id', '/geturl.php');
8
9  try {
10    http.Response response = await http.get(myUrl );
11    return response.body;
12  } catch (e) {
13    throw (e);
14  }
15}
16
17MeteorClient meteor = MeteorClient.connect(url: getUrl());
18
19getUrl() async {
20  String url = await getUrl2();
21  return url;
22}
23
24void main() {
25  runApp(const MyApp());
26}
27  class YourGlobalClass {
28    Future&lt;String&gt; getUrl2() async {
29      Uri myUrl = Uri.http('myurl.id', '/geturl.php');
30
31      try {
32        http.Response response = await http.get(myUrl);
33        return response.body;
34      } catch (e) {
35        throw (e);
36      }
37    }
38
39    Future&lt;MeteorClient&gt; meteor() async {
40      final meteor = MeteorClient.connect(url: await getUrl());
41      return meteor;
42    }
43
44    Future&lt;String&gt; getUrl() async {
45      String url = await getUrl2();
46      return url;
47    }
48  }
49YourGlobalClass().getUrl();
50YourGlobalClass().getUrl2();
51YourGlobalClass().meteor();
52

Source https://stackoverflow.com/questions/71406937

QUESTION

Tone.PitchShift and Howler.js issues

Asked 2022-Feb-17 at 12:31

I enjoy using Howler.js for my (Meteor) application. However, the playback rate function is causing a pitch shift that I don't want (I just want the time stretch, and to preserve the pitch). My solution was to therefore implement a pitch shift to it to 'correct' the pitch. Seemed simple enough, which is why I chose to use https://tonejs.github.io/

Only problem is, I cannot for the life of me get it to work correctly. After hours of reading up on Web Audio API, and Tone.js documentation, and online discussion/troubleshoot forums, the closest to a potential solution I got was something like so (called during render of my application, just in case the issue had to do with loading prematurely):

1Tone.setContext(Howler.ctx); //set tone's context to the Howler.js audiocontext
2var pShift = new Tone.PitchShift(3); //create the PitchShift effect, +3 semi-tones transposition
3pShift.context = Howler.ctx; //set the PitchShift's context to the Howler.js audiocontext
4pShift.connect(Howler.ctx.destination); //connect the PitchShift's output to the Howler's destination
5Howler.masterGain.connect(pShift); //connect the Howler's master GainNode output to the PitchShift effect
6
7//For debugging purposes:
8console.log(Howler.masterGain)
9console.log(pShift);
10

When I do run this I get this error message:

Exception from Tracker afterFlush function: meteor.js?hash=857dafb4b9dff17e29ed8498a22ea5b1a3d6b41d:1059 TypeError: Failed to execute 'connect' on 'AudioNode': Overload resolution failed.

I also noticed that the console.log() commands below those don't even show up in the console, strangely enough. They do, however, when I remove the last line (mastergain.connect to the pShift).

I tried a few other techniques, such as https://github.com/mmckegg/soundbank-pitch-shift/ (which worked but it played both the pitch shifted sound and the non-pitch shifted sound, no matter what settings I put it at), Or simply using AudioBufferSourceNode.detune (I couldn't figure out how to get it to work with Howler.js because Howler only has functions that can expose the GainNode and the AudioContext, wasn't able to figure out how to read output from there while still using Howler).

Any help/leads would be greatly appreciated!

ANSWER

Answered 2021-Oct-18 at 19:59

I think you don't need the 3rd line in your snippet. Since your first line is telling Tone.js to use the AudioContext created by howler.js already. Therefore pShift.context should be equal to Howler.ctx. But it might make sense to double check.

1Tone.setContext(Howler.ctx); //set tone's context to the Howler.js audiocontext
2var pShift = new Tone.PitchShift(3); //create the PitchShift effect, +3 semi-tones transposition
3pShift.context = Howler.ctx; //set the PitchShift's context to the Howler.js audiocontext
4pShift.connect(Howler.ctx.destination); //connect the PitchShift's output to the Howler's destination
5Howler.masterGain.connect(pShift); //connect the Howler's master GainNode output to the PitchShift effect
6
7//For debugging purposes:
8console.log(Howler.masterGain)
9console.log(pShift);
10console.assert(pShift.context === Howler.ctx);
11

The masterGain exposed by howler.js is a native audio node. That means it can't be connected to a node created with Tone.js directly since these are not native audio nodes. But Tone.js offers a helper to do that.

1Tone.setContext(Howler.ctx); //set tone's context to the Howler.js audiocontext
2var pShift = new Tone.PitchShift(3); //create the PitchShift effect, +3 semi-tones transposition
3pShift.context = Howler.ctx; //set the PitchShift's context to the Howler.js audiocontext
4pShift.connect(Howler.ctx.destination); //connect the PitchShift's output to the Howler's destination
5Howler.masterGain.connect(pShift); //connect the Howler's master GainNode output to the PitchShift effect
6
7//For debugging purposes:
8console.log(Howler.masterGain)
9console.log(pShift);
10console.assert(pShift.context === Howler.ctx);
11Tone.connect(Howler.masterGain, pShift);
12

I think you also need to call disconnect() on the masterGain to remove any existing connections.

The following snippet should work.

1Tone.setContext(Howler.ctx); //set tone's context to the Howler.js audiocontext
2var pShift = new Tone.PitchShift(3); //create the PitchShift effect, +3 semi-tones transposition
3pShift.context = Howler.ctx; //set the PitchShift's context to the Howler.js audiocontext
4pShift.connect(Howler.ctx.destination); //connect the PitchShift's output to the Howler's destination
5Howler.masterGain.connect(pShift); //connect the Howler's master GainNode output to the PitchShift effect
6
7//For debugging purposes:
8console.log(Howler.masterGain)
9console.log(pShift);
10console.assert(pShift.context === Howler.ctx);
11Tone.connect(Howler.masterGain, pShift);
12Tone.setContext(Howler.ctx);
13
14const pShift = new Tone.PitchShift(3);
15
16Howler.masterGain.disconnect();
17
18Tone.connect(Howler.masterGain, pShift);
19pShift.toDestination();
20

Source https://stackoverflow.com/questions/69621611

QUESTION

How to access attributes [e.g. time] of terra raster in R?

Asked 2022-Feb-07 at 18:13

I have a raster that is read and cropped from a netcdf4 file. The raster looks like this:

1&gt; library(terra)
2
3&gt; ncr1
4class       : SpatRaster 
5dimensions  : 341, 745, 3  (nrow, ncol, nlyr)
6resolution  : 1000, 1000  (x, y)
7extent      : 1369250, 2114250, -674500, -333500  (xmin, xmax, ymin, ymax)
8coord. ref. : +proj=lcc +lat_0=42.5 +lon_0=-100 +lat_1=25 +lat_2=60 +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs 
9source      : memory 
10names       :    vp_1,    vp_2,    vp_3 
11min values  :  174.03,  195.29,  393.66 
12max values  :  516.43,  606.79, 1047.61 
13time        : 2009-01-01 12:00:00 to 2009-01-03 12:00:00 
14
15&gt; dput(ncr1@ptr$time)
16c(1230811200, 1230897600, 1230984000)
17
18

As part of the processing I want to do, I want to use the time attribute (I'm not sure if that's the right adjective for that component) as a vector input with my process, such as how doy is used in meteor::hourlyFromDailyRelH() : hourlyFromDailyRelh(relh, tmin, tmax, doy, latitude). I don't know how to call the attribute programatically. It looks like I can use ncr@ptr$time, but it seems like that's the wrong way to do it, based on this question at least. For example:

1&gt; library(terra)
2
3&gt; ncr1
4class       : SpatRaster 
5dimensions  : 341, 745, 3  (nrow, ncol, nlyr)
6resolution  : 1000, 1000  (x, y)
7extent      : 1369250, 2114250, -674500, -333500  (xmin, xmax, ymin, ymax)
8coord. ref. : +proj=lcc +lat_0=42.5 +lon_0=-100 +lat_1=25 +lat_2=60 +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs 
9source      : memory 
10names       :    vp_1,    vp_2,    vp_3 
11min values  :  174.03,  195.29,  393.66 
12max values  :  516.43,  606.79, 1047.61 
13time        : 2009-01-01 12:00:00 to 2009-01-03 12:00:00 
14
15&gt; dput(ncr1@ptr$time)
16c(1230811200, 1230897600, 1230984000)
17
18&gt; library(lubridate)
19&gt; pdays &lt;- yday(as_datetime(ncr1@ptr$time))
20&gt; pdays
21[1] 1 2 3
22

is wrong? I mean it seems to work, but if there is a more appropriate function in R (or terra) for getting the @ptr$time part, I don't know what it is. I tried terra::cats() and using getSlots(), but those are wrong.

ANSWER

Answered 2022-Feb-07 at 16:53

I guess you are looking for the following:

1&gt; library(terra)
2
3&gt; ncr1
4class       : SpatRaster 
5dimensions  : 341, 745, 3  (nrow, ncol, nlyr)
6resolution  : 1000, 1000  (x, y)
7extent      : 1369250, 2114250, -674500, -333500  (xmin, xmax, ymin, ymax)
8coord. ref. : +proj=lcc +lat_0=42.5 +lon_0=-100 +lat_1=25 +lat_2=60 +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs 
9source      : memory 
10names       :    vp_1,    vp_2,    vp_3 
11min values  :  174.03,  195.29,  393.66 
12max values  :  516.43,  606.79, 1047.61 
13time        : 2009-01-01 12:00:00 to 2009-01-03 12:00:00 
14
15&gt; dput(ncr1@ptr$time)
16c(1230811200, 1230897600, 1230984000)
17
18&gt; library(lubridate)
19&gt; pdays &lt;- yday(as_datetime(ncr1@ptr$time))
20&gt; pdays
21[1] 1 2 3
22terra::time(ncr1)
23

Source https://stackoverflow.com/questions/71021666

QUESTION

Collection update Meteor failure from failed regex validation but no regex

Asked 2022-Jan-25 at 17:47

I am working with a Meteor schema that has a field defined as below:

1export const MyCollectionSchema = new SimpleSchema({
2  myField: {
3    optional: true,
4    type: String,
5  },
6...
7});
8

We have also attached the behavior below:

1export const MyCollectionSchema = new SimpleSchema({
2  myField: {
3    optional: true,
4    type: String,
5  },
6...
7});
8export const MyCollection = new Meteor.Collection('my_collection');
9
10MyCollection.deny({
11  insert: () =&gt; true,
12  update: () =&gt; true,
13  remove: () =&gt; true,
14});
15
16MyCollection.attachBehaviour('timestampable', {
17  createdAt: 'insertedAt',
18  createdBy: 'insertedBy',
19  updatedAt: 'modifiedAt',
20  updatedBy: 'modifiedBy',
21});
22
23MyCollection.attachSchema(MyCollectionSchema);
24

I am trying to update an existing item with this call:

1export const MyCollectionSchema = new SimpleSchema({
2  myField: {
3    optional: true,
4    type: String,
5  },
6...
7});
8export const MyCollection = new Meteor.Collection('my_collection');
9
10MyCollection.deny({
11  insert: () =&gt; true,
12  update: () =&gt; true,
13  remove: () =&gt; true,
14});
15
16MyCollection.attachBehaviour('timestampable', {
17  createdAt: 'insertedAt',
18  createdBy: 'insertedBy',
19  updatedAt: 'modifiedAt',
20  updatedBy: 'modifiedBy',
21});
22
23MyCollection.attachSchema(MyCollectionSchema);
24 MyCollection.update(
25    { _id: myId },
26    { $set: {
27      myField: myFieldValue,
28      modifiedAt: new Date().toString(),
29      modifiedBy:  userId,
30    } },
31  );
32

But it keeps failing because of regex validation failure:

(Error: Modified by failed regular expression validation in my_collection update)

I am not using regex in here and am not super familiar with meteor so am not sure if I should be using regex here. Help :/

ANSWER

Answered 2022-Jan-25 at 17:16

If I read the documentation for the package you are using (I assume it's this one https://github.com/zimme/meteor-collection-timestampable), then the whole idea is that you won't need to set modifiedAt and modifiedBy. That's what the collection-timestamable package will do for you automatically. The error might happen because the package doesn't like you overriding it's fields. I would try just:

1export const MyCollectionSchema = new SimpleSchema({
2  myField: {
3    optional: true,
4    type: String,
5  },
6...
7});
8export const MyCollection = new Meteor.Collection('my_collection');
9
10MyCollection.deny({
11  insert: () =&gt; true,
12  update: () =&gt; true,
13  remove: () =&gt; true,
14});
15
16MyCollection.attachBehaviour('timestampable', {
17  createdAt: 'insertedAt',
18  createdBy: 'insertedBy',
19  updatedAt: 'modifiedAt',
20  updatedBy: 'modifiedBy',
21});
22
23MyCollection.attachSchema(MyCollectionSchema);
24 MyCollection.update(
25    { _id: myId },
26    { $set: {
27      myField: myFieldValue,
28      modifiedAt: new Date().toString(),
29      modifiedBy:  userId,
30    } },
31  );
32 MyCollection.update({ _id: myId }, {$set: {myField: myFieldValue}});
33

Source https://stackoverflow.com/questions/70851408

QUESTION

Meteor global version is different than project's

Asked 2022-Jan-14 at 14:09

I've created a meteor project and noticed its meteor version was really behind the global meteor installation version:

npm global meteor installed version

If I check meteor version outside of a meteor project, it returns an older version: older meteor version

And this older version matches the meteor version in this project I've just created.

After some googling, I learned there was this directory ~/.meteor and apparently it contained and older meteor version: .meteor packages dir

Then, I renamed this dir to meteorBKP and ran meteor --version expecting that now the meteor command would point to the npm global package. What happened, though, is that the directory was created again, but this time containing a much newer version.

meteor version after renaming dir

So, apparently, I have two meteor versions installed in my computer. Is it expected? How can I remove that unwanted installation and use only the npm global package?

If you need further info to help, I'll gladly provide it.

Thanks in advance!

ANSWER

Answered 2022-Jan-14 at 14:09

Actually, you don't have two Meteor versions in your machine. Right now, you have only Meteor 2.5.3 (the latest version).

Version 2.5.4 that you see from npm is the version of the Meteor installer. This npm package is not Meteor itself, it is just an installer. You can see and compare these versions here (https://www.npmjs.com/package/meteor).

Besides that, each Meteor project may have different versions. If you create a project right now (meteor create myproject), by default it will use Meteor 2.5.3 (the newer version you have locally) but that project you mention you have created before with Meteor 1.8.1 will still use version 1.8.1. You can check which Meteor version a project is using by checking yourprojectdirectory/.meteor/release.

Also, you have the option to create a new project with an older version by just passing a --release option (meteor create myproject --release 2.5.1).

I hope it is more clear now.

Source https://stackoverflow.com/questions/70705363

QUESTION

Typescript - Extending existing module declarations

Asked 2022-Jan-14 at 07:06

I am still learning typescript, so I got stuck. Also couldnt find anything online.

I am using meteor js which has the following module declaration meteor.d.ts:

1declare module 'meteor/meteor' {
2    type global_Error = Error;
3    module Meteor {
4        /** User **/
5        interface UserEmail {
6            address: string;
7            verified: boolean;
8        }
9        interface User {
10            _id: string;
11            username?: string | undefined;
12            emails?: UserEmail[] | undefined;
13            createdAt?: Date | undefined;
14            profile?: any;
15            services?: any;
16        }
17
18        function user(options?: { fields?: Mongo.FieldSpecifier | undefined }): User | null;
19
20        function userId(): string | null;
21        var users: Mongo.Collection&lt;User&gt;;
22        /** User **/
23    }
24}
25

Now I have some additional Fields for a user, so I would like to extend the interface User in the module Meteor with some fields:

1declare module 'meteor/meteor' {
2    type global_Error = Error;
3    module Meteor {
4        /** User **/
5        interface UserEmail {
6            address: string;
7            verified: boolean;
8        }
9        interface User {
10            _id: string;
11            username?: string | undefined;
12            emails?: UserEmail[] | undefined;
13            createdAt?: Date | undefined;
14            profile?: any;
15            services?: any;
16        }
17
18        function user(options?: { fields?: Mongo.FieldSpecifier | undefined }): User | null;
19
20        function userId(): string | null;
21        var users: Mongo.Collection&lt;User&gt;;
22        /** User **/
23    }
24}
25interface UserAdditonal {
26    field1: string
27    field2: string
28    field3: string
29}
30

How would I do that? I tried this:

1declare module 'meteor/meteor' {
2    type global_Error = Error;
3    module Meteor {
4        /** User **/
5        interface UserEmail {
6            address: string;
7            verified: boolean;
8        }
9        interface User {
10            _id: string;
11            username?: string | undefined;
12            emails?: UserEmail[] | undefined;
13            createdAt?: Date | undefined;
14            profile?: any;
15            services?: any;
16        }
17
18        function user(options?: { fields?: Mongo.FieldSpecifier | undefined }): User | null;
19
20        function userId(): string | null;
21        var users: Mongo.Collection&lt;User&gt;;
22        /** User **/
23    }
24}
25interface UserAdditonal {
26    field1: string
27    field2: string
28    field3: string
29}
30declare module &quot;meteor/meteor&quot; {
31    module Meteor {
32        function user(options?: {
33            fields?: Mongo.FieldSpecifier | undefined
34        }): (User &amp; userAdditonal) | null
35
36        var users: Mongo.Collection&lt;User &amp; userAdditonal&gt;
37    }
38}
39

Which throws an error meteor.d.ts(56, 13): 'users' was also declared here. and also only works in the same file. Also it is more like overwriting, and less like extending

Is it possible to do globally, so I declare it in one file and all other files that import 'meteor/meteor' get the extended types without importing my file?

Any help is greatly appreciated!

ANSWER

Answered 2022-Jan-14 at 07:06

Yes it is common to enrich your Meteor.users collection (although it is advised not to put too much data in it), and you can definitely tell TypeScript which extra keys you have added.

The idea is simply to enrich the Meteor.User interface. Because that interface is then used as the return type for Meteor.user() function and the document type for Meteor.users collection (as shown in the extract of the definition in your question), it will automatically be available whenever you use them.

1declare module 'meteor/meteor' {
2    type global_Error = Error;
3    module Meteor {
4        /** User **/
5        interface UserEmail {
6            address: string;
7            verified: boolean;
8        }
9        interface User {
10            _id: string;
11            username?: string | undefined;
12            emails?: UserEmail[] | undefined;
13            createdAt?: Date | undefined;
14            profile?: any;
15            services?: any;
16        }
17
18        function user(options?: { fields?: Mongo.FieldSpecifier | undefined }): User | null;
19
20        function userId(): string | null;
21        var users: Mongo.Collection&lt;User&gt;;
22        /** User **/
23    }
24}
25interface UserAdditonal {
26    field1: string
27    field2: string
28    field3: string
29}
30declare module &quot;meteor/meteor&quot; {
31    module Meteor {
32        function user(options?: {
33            fields?: Mongo.FieldSpecifier | undefined
34        }): (User &amp; userAdditonal) | null
35
36        var users: Mongo.Collection&lt;User &amp; userAdditonal&gt;
37    }
38}
39// In a file that is imported somewhere
40
41declare module &quot;meteor/meteor&quot; {
42  module Meteor {
43    interface User {
44      field1: string
45      field2: string
46      field3: string
47    }
48
49    // If you already have an existing interface that you want to &quot;merge&quot;
50    // into Meteor.User:
51    interface User extends UserAdditonal {}
52  }
53}
54

Then do not forget to import the "meteor/meteor" module, and your extra fields should automatically be available:

1declare module 'meteor/meteor' {
2    type global_Error = Error;
3    module Meteor {
4        /** User **/
5        interface UserEmail {
6            address: string;
7            verified: boolean;
8        }
9        interface User {
10            _id: string;
11            username?: string | undefined;
12            emails?: UserEmail[] | undefined;
13            createdAt?: Date | undefined;
14            profile?: any;
15            services?: any;
16        }
17
18        function user(options?: { fields?: Mongo.FieldSpecifier | undefined }): User | null;
19
20        function userId(): string | null;
21        var users: Mongo.Collection&lt;User&gt;;
22        /** User **/
23    }
24}
25interface UserAdditonal {
26    field1: string
27    field2: string
28    field3: string
29}
30declare module &quot;meteor/meteor&quot; {
31    module Meteor {
32        function user(options?: {
33            fields?: Mongo.FieldSpecifier | undefined
34        }): (User &amp; userAdditonal) | null
35
36        var users: Mongo.Collection&lt;User &amp; userAdditonal&gt;
37    }
38}
39// In a file that is imported somewhere
40
41declare module &quot;meteor/meteor&quot; {
42  module Meteor {
43    interface User {
44      field1: string
45      field2: string
46      field3: string
47    }
48
49    // If you already have an existing interface that you want to &quot;merge&quot;
50    // into Meteor.User:
51    interface User extends UserAdditonal {}
52  }
53}
54import { Meteor } from &quot;meteor/meteor&quot;;
55
56Meteor.user().field1; // string
57
58Meteor.users.findOne().field2; // string
59

Source https://stackoverflow.com/questions/70695314

Community Discussions contain sources that include Stack Exchange Network

Tutorials and Learning Resources in Meteor

Tutorials and Learning Resources are not available at this moment for Meteor

Share this Page

share link

Get latest updates on Meteor