Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't seem to re-install - please help! #28

Open
LorenAmelang opened this issue Dec 10, 2022 · 2 comments
Open

Can't seem to re-install - please help! #28

LorenAmelang opened this issue Dec 10, 2022 · 2 comments

Comments

@LorenAmelang
Copy link

I had a nice working Gridsome Bulma site, but my Windows version that built it died and had to be reinstalled. Trying to recreate it has been a nightmare!

I've given up on Windows and moved my efforts to Arch Linux. After much fumbling, the Gridsome Starter now runs "develop" successfully:

[loren@Gazp9 default]$ gridsome develop
Gridsome v0.7.23

Initializing plugins...
Load sources - 0s
Create GraphQL schema - 0.03s
Create pages and templates - 0.03s
Generate temporary code - 0.03s
Bootstrap finish - 0.49s
egrep: warning: egrep is obsolescent; using grep -E

 DONE  Compiled successfully in 1724ms

But the Bulma install fails:

[loren@Gazp9 gridsome]$ gridsome create bulma https://github.com/calebanthony/gridsome-bulma.git
❯ Clone https://github.com/calebanthony/gridsome-bulma.git 2.88s
❯ Update project package.json 0s
❯ Install dependencies
  • Installing dependencies with npm...
Error: Failed to install dependencies with npm. Please enter bulma directory and install dependencies with yarn or npm manually. Then run gridsome develop to start local development.

    Exit code 1
    at ChildProcess.<anonymous> (/usr/lib/node_modules/@gridsome/cli/lib/commands/create.js:106:17)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1100:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
[loren@Gazp9 gridsome]$

Every suggestion I've found for how to install dependencies manually has triggered storms of hundreds of errors. Can you please suggest exactly how to "enter bulma directory and install dependencies with yarn or npm manually"? (I gather yarn no longer works for such installations?)

Trying to copy the old Windows files to a new Linux folder, I can run gridsome develop, and always get two errors:

[loren@Gazp9 bu22]$ gridsome develop
Gridsome v0.7.23

Initializing plugins...
Load sources - 0s
Create GraphQL schema - 0.03s
Create pages and templates - 0.04s
Generate temporary code - 0.02s
Bootstrap finish - 0.5s
egrep: warning: egrep is obsolescent; using grep -E

 ERROR  Failed to compile with 2 errors                                                                              4:01:52 PM

 error  in ./src/assets/style/index.scss

Module build failed (from ../node_modules/sass-loader/dist/cjs.js):
SassError: Undefined variable.
   ╷
21 │   color: $white;
   │          ^^^^^^
   ╵
  src/assets/style/_overrides.scss 21:10  @import
  src/assets/style/index.scss 8:9         root stylesheet

 @ ./src/assets/style/index.scss 4:14-219 15:3-20:5 16:22-227
 @ ./src/main.js
 @ ./node_modules/gridsome/app/app.js
 @ ./node_modules/gridsome/app/entry.client.js
 @ multi webpack/hot/dev-server webpack-hot-middleware/client?name=app&reload=true&noInfo=true ./node_modules/gridsome/app/entry.client.js ./node_modules/gridsome/app/entry.sockjs.js

 error  in ./src/pages/Index.vue?vue&type=custom&index=0&blockType=page-query

Module build failed (from ./node_modules/gridsome/lib/plugins/vue-components/lib/loaders/page-query.js):
Error: Cannot query field "edges" on type "Page".

GraphQL request:4:5
3 |   posts: allPage {
4 |     edges {
  |     ^
5 |       node {
    at Object.module.exports (/home/loren/gridsome/bu22/node_modules/gridsome/lib/plugins/vue-components/lib/loaders/page-query.js:33:23)

 @ ./src/pages/Index.vue?vue&type=custom&index=0&blockType=page-query 1:0-331 1:347-350 1:352-680 1:352-680
 @ ./src/pages/Index.vue
 @ ./src/.temp/routes.js
 @ ./node_modules/gridsome/app/router.js
 @ ./node_modules/gridsome/app/entry.sockjs.js
 @ multi webpack/hot/dev-server webpack-hot-middleware/client?name=app&reload=true&noInfo=true ./node_modules/gridsome/app/entry.client.js ./node_modules/gridsome/app/entry.sockjs.js

But every time I fix one of those manually, a subsidiary error pops up. Pretty obviously there have been a lot of incompatible code changes since my old version.

If I get a new installation of the Starter working, will I still have to fix all of those little errors in the code for my site?

Is there maybe some other route I should be trying to be able to save all my content to a new working website?

@calebanthony
Copy link
Owner

Unfortunately I haven't used Gridsome in some time and haven't kept up with their changes.

I'd be open to a pull request if you figure out how to make it compatible moving forward, but it's not something I have capacity for at the moment.

@LorenAmelang
Copy link
Author

@calebanthony

If you're suggesting I submit a pull request, you're way overestimating my knowledge of the situation!

But I seem to have found a way to build my site, using the https://github.com/jgthms/bulma instead of yours. See jgthms/bulma#3609

Searching within your files, I find several instances of "jgthms", so maybe they are the same basic code?

To avoid the disastrous stream of npm errors, it seems I just have to ignore the
51 vulnerabilities (14 moderate, 34 high, 3 critical)
report that installing bulma triggers.

Here's what worked:

$ gridsome create jgthms

$ cd jgthms
$ gridsome develop
Gridsome v0.7.23

DONE  Compiled successfully in 2152ms 
DONE  Compiled successfully in 65ms 

--> Test page worked

$ npm install bulma
added 1 package, and audited 1410 packages in 3s
51 vulnerabilities (14 moderate, 34 high, 3 critical)

$ gridsome develop
Gridsome v0.7.23

DONE  Compiled successfully in 1689ms
DONE  Compiled successfully in 66ms

--> Copied in my site files:

$ gridsome develop
Gridsome v0.7.23

 ERROR  Failed to compile with 1 errors
This dependency was not found:
* ~/components/Logo.vue in ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/babel-loader/lib??ref--1-1!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/layouts/Default.vue?vue&type=script&lang=js&

--> Copied 5 files from previous backup:

$ ls -al src/components/
total 32
drwxr-xr-x 2 loren loren 4096 Dec 30 16:47 .
drwxr-xr-x 8 loren loren 4096 Dec 30 16:41 ..
-rw-r--r-- 1 loren loren  528 Apr  9  2020 Author.vue
-rw-r--r-- 1 loren loren  239 Apr  9  2020 Logo.vue
-rw-r--r-- 1 loren loren 1086 Jan  6  2020 PostCard.vue
-rw-r--r-- 1 loren loren  572 Jan  6  2020 PostMeta.vue
-rw-r--r-- 1 loren loren  364 Dec 11  2019 PostTags.vue
-rw-r--r-- 1 loren loren  173 Dec 29 21:13 README.md
$

Maybe that is a call from a bit of your code to other bits of your additions to jgthms bulma?

These seem like npm missed some dependncies:

$ gridsome develop
Error: Cannot find module '@gridsome/source-filesystem'

$ npm install @gridsome/source-filesystem
added 6 packages, and audited 1416 packages in 6s
52 vulnerabilities (14 moderate, 35 high, 3 critical)

$ gridsome develop
Error: Cannot find module '@gridsome/plugin-sitemap'

$ npm install @gridsome/plugin-sitemap
added 4 packages, and audited 1420 packages in 3s
52 vulnerabilities (14 moderate, 35 high, 3 critical)

$ gridsome develop
Error: No transformer for 'text/markdown' is installed.

$ npm install @gridsome/transformer-remark
npm WARN deprecated @types/[email protected]: This is a stub types definition. vfile-message provides its own type definitions, so you do not need this installed.
added 84 packages, and audited 1504 packages in 5s
58 vulnerabilities (15 moderate, 38 high, 5 critical)

$ gridsome develop
Error: Cannot find module '@gridsome/remark-prismjs'

$ npm install @gridsome/remark-prismjs
added 9 packages, and audited 1513 packages in 7s
58 vulnerabilities (15 moderate, 38 high, 5 critical)

More vulnerabilities, which I guess we just have to ignore...

$ gridsome develop
Gridsome v0.7.23

Initializing plugins...
Load sources - 0.07s
Create GraphQL schema - 0.06s
Create pages and templates - 0.04s
Generate temporary code - 0.03s
Bootstrap finish - 0.95s
egrep: warning: egrep is obsolescent; using grep -E

 DONE  Compiled successfully in 5845ms
 DONE  Compiled successfully in 108ms

Most of site works, some hacks I made to previous install need to be repeated...

So my main question now is whether any of those "vulnerabilities" could propagate into my built site and affect my users. I kind of suspect they couldn't endanger a static site...

Dug into this...
egrep: warning: egrep is obsolescent; using grep -E
https://bbs.archlinux.org/viewtopic.php?id=279614

Found this:

node_modules/physical-cpu-count/index.js 2 KB JavaScript File 11/30/2022 5:20:55 PM 
  const output = exec('lscpu -p | egrep -v "^#" | sort -u -t, -k 2,4 | wc -l')

--> Only called by Linux systems...
Changed egrep to grep -E
Warning gone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants