-
Notifications
You must be signed in to change notification settings - Fork 13
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
Building website failing #54
Comments
Yeah the error isn't apparent from the log :/ It fails while fetching the data so it might be that the token hasn't been created with the sufficient permissions. I'll take a deeper look when I get to my computer. Thanks for reporting. |
No problem, also turns out, copying the latest files made it work. If you cant duplicate and isolate the above issues, please create a new release it should work fine for most users atleast |
Yeah I was gonna release v2.1 with the fixes, forgot to go about it. I'll do that in a bit. I'll take a look into the infolinks issue 👍 |
@hello-stark can you try with the latest commit (37b0ee0) ? I was able to build the page with no issues. Config and output for reference: {
"username": "shaansubbaiah",
"repos": 15,
"avatar": "",
"linkedinURL": "https://www.linkedin.com/in/shaansubbaiah/",
"twitterId": "",
"gitlabId": "",
"socialPreviewImage": true,
"profileREADME": false,
"navLinks": [
{
"name": "link1",
"link": "https://www.link1.com"
},
{
"name": "link2",
"link": "https://www.link2.com"
}
],
"infoLinks": [
{
"name": "ilink1",
"link": "https://www.ilink1.com"
},
{
"name": "ilink2",
"link": "https://www.ilink2.com"
}
]
}
If it fixes it for you, I'll add it to the latest release fix. |
Ok @shaansubbaiah , the get data part is working now, but the build is still failing for some reason █▀█ █▀█ █▀█ ▀█▀ █▀▀ █▀█ █░░ █ █▀█
█▀▀ █▄█ █▀▄ ░█░ █▀░ █▄█ █▄▄ █ █▄█
https://github.com/shaansubbaiah/Portfolio
? What would you like to do? Build Portfolio
Fetching data from GitHub
---- Writing data to C:\Users\root\Documents\projects\Portfolio-2.0\github-data.json
Downloading images from GitHub
---- Downloaded avatar
---- Downloaded repo social preview images
Running 'npm run build'
node:internal/errors:863
const err = new Error(message);
^
Error: Command failed: npm run build
[vite]: Rollup failed to resolve import "@fontsource/poppins/400.css" from "src/main.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
error during build:
Error: [vite]: Rollup failed to resolve import "@fontsource/poppins/400.css" from "src/main.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
at onRollupWarning (file:///C:/Users/root/Documents/projects/Portfolio-2.0/node_modules/vite/dist/node/chunks/dep-67e7f8ab.js:45526:19)
at onwarn (file:///C:/Users/root/Documents/projects/Portfolio-2.0/node_modules/vite/dist/node/chunks/dep-67e7f8ab.js:45297:13)
at Object.onwarn (file:///C:/Users/root/Documents/projects/Portfolio-2.0/node_modules/rollup/dist/es/shared/rollup.js:23263:13)
at ModuleLoader.handleResolveId (file:///C:/Users/root/Documents/projects/Portfolio-2.0/node_modules/rollup/dist/es/shared/rollup.js:22158:26)
at file:///C:/Users/root/Documents/projects/Portfolio-2.0/node_modules/rollup/dist/es/shared/rollup.js:22119:26
at ChildProcess.exithandler (node:child_process:412:12)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1091:16)
at ChildProcess._handle.onexit (node:internal/child_process:302:5) {
code: 1,
killed: false,
signal: null,
cmd: 'npm run build',
stdout: '\n' +
'> [email protected] build\n' +
'> vite build\n' +
'\n' +
'\x1B[36mvite v3.2.4 \x1B[32mbuilding for production...\x1B[36m\x1B[39m\n' +
'transforming...\n' +
'\x1B[32m✓\x1B[39m 3 modules transformed.\n',
stderr: '\x1B[31m[vite]: Rollup failed to resolve import "@fontsource/poppins/400.css" from "src/main.js".\n' +
'This is most likely unintended because it can break your application at runtime.\n' +
'If you do want to externalize this module explicitly add it to\n' +
'`build.rollupOptions.external`\x1B[39m\n' +
'\x1B[31merror during build:\n' +
'Error: [vite]: Rollup failed to resolve import "@fontsource/poppins/400.css" from "src/main.js".\n' +
'This is most likely unintended because it can break your application at runtime.\n' +
'If you do want to externalize this module explicitly add it to\n' +
'`build.rollupOptions.external`\n' +
' at onRollupWarning (file:///C:/Users/root/Documents/projects/Portfolio-2.0/node_modules/vite/dist/node/chunks/dep-67e7f8ab.js:45526:19)\n' +
' at onwarn (file:///C:/Users/root/Documents/projects/Portfolio-2.0/node_modules/vite/dist/node/chunks/dep-67e7f8ab.js:45297:13)\n' +
' at Object.onwarn (file:///C:/Users/root/Documents/projects/Portfolio-2.0/node_modules/rollup/dist/es/shared/rollup.js:23263:13)\n' +
' at ModuleLoader.handleResolveId (file:///C:/Users/root/Documents/projects/Portfolio-2.0/node_modules/rollup/dist/es/shared/rollup.js:22158:26)\n' +
' at file:///C:/Users/root/Documents/projects/Portfolio-2.0/node_modules/rollup/dist/es/shared/rollup.js:22119:26\x1B[39m\n'
}
Node.js v18.12.1 this appears to be some sort of setup issue for me |
Can you share your |
Here you go, sorry for the late reply {
"name": "portfolio",
"private": true,
"version": "1.6.0",
"description": "Automatically generates a responsive, static-site with the user’s Github projects.",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"author": "Shaan Subbaiah <[email protected]>",
"license": "MIT",
"dependencies": {},
"devDependencies": {
"vite": "^3.2.3",
"vite-plugin-handlebars": "^1.6.0",
"axios": "^0.21.2",
"dotenv": "^8.2.0",
"fs-extra": "^9.0.1",
"inquirer": "^9.1.4",
"markdown-it": "^12.3.2",
"sharp": "^0.30.2"
}
} |
Upon deleting the entire node_modules folder and reinstalling with latest ---- Downloaded repo social preview images
Running 'npm run build'
(node:483) UnhandledPromiseRejectionWarning: Error: Command failed: npm run build
file:///mnt/c/Users/arook/Documents/projects/Portfolio-2.0/node_modules/vite/bin/vite.js:7
await import('source-map-support').then((r) => r.default.install())
^^^^^
SyntaxError: Unexpected reserved word
at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18)
at async link (internal/modules/esm/module_job.js:42:21)
at ChildProcess.exithandler (child_process.js:308:12)
at ChildProcess.emit (events.js:314:20)
at maybeClose (internal/child_process.js:1022:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
(node:483) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:483) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. |
This looks like an issue with your Node or Vite installation. I've published the latest commits to the v2.1 release for now. I suggest setting up the project fresh, cloning the latest release/commit and installing the npm packages again and testing. I use Manjaro and I'm pretty sure I'm also on Node v18 too, I'll cross check and get back to you. |
I was running node v17.2, upgraded to latest LTS - v18.12.1 and was unable to reproduce the issue. I think it might be an installation problem on your end, not entirely sure tho. ❯ node --version
v18.12.1 ❯ npm --version
9.2.0 ❯ cat package.json
───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ File: package.json
───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ {
2 │ "name": "portfolio",
3 │ "private": true,
4 │ "version": "2.1",
5 │ "description": "Automatically generates a responsive, static-site with the user’s Github projects.",
6 │ "type": "module",
7 │ "scripts": {
8 │ "dev": "vite",
9 │ "build": "vite build",
10 │ "preview": "vite preview"
11 │ },
12 │ "author": "Shaan Subbaiah <[email protected]>",
13 │ "license": "MIT",
14 │ "dependencies": {
15 │ "@fontsource/poppins": "^4.5.10",
16 │ "canvas-confetti": "^1.6.0",
17 │ "masonry-layout": "^4.2.2"
18 │ },
19 │ "devDependencies": {
20 │ "axios": "^0.21.2",
21 │ "dotenv": "^8.2.0",
22 │ "fs-extra": "^9.0.1",
23 │ "inquirer": "^9.1.4",
24 │ "markdown-it": "^12.3.2",
25 │ "sharp": "^0.30.2",
26 │ "vite": "^3.2.3",
27 │ "vite-plugin-handlebars": "^1.6.0"
28 │ }
29 │ }
───────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ❯ npm run build
> [email protected] build
> vite build
vite v3.2.4 building for production...
✓ 24 modules transformed.
../dist/assets/poppins-devanagari-400-normal.478b3ab7.woff2 38.64 KiB
../dist/assets/poppins-latin-ext-400-normal.cb8bdeab.woff2 5.41 KiB
../dist/assets/poppins-devanagari-500-normal.721c714f.woff2 38.22 KiB
../dist/assets/poppins-latin-400-normal.7d93459d.woff2 7.70 KiB
../dist/assets/poppins-latin-ext-500-normal.5f9d6298.woff2 5.32 KiB
../dist/assets/poppins-latin-500-normal.cd36de20.woff2 7.57 KiB
../dist/assets/poppins-latin-ext-600-normal.9c15f7b0.woff2 5.38 KiB
../dist/assets/poppins-devanagari-600-normal.d036ece3.woff2 38.40 KiB
../dist/assets/poppins-latin-600-normal.f4e80d9d.woff2 7.81 KiB
../dist/assets/poppins-devanagari-700-normal.6197a412.woff2 38.23 KiB
../dist/assets/poppins-latin-ext-700-normal.4ce2c84c.woff2 5.26 KiB
../dist/assets/poppins-latin-700-normal.9338e65f.woff2 7.63 KiB
../dist/assets/poppins-all-400-normal.c68e1edb.woff 65.01 KiB
../dist/assets/poppins-all-500-normal.9ec8c55c.woff 64.22 KiB
../dist/assets/poppins-all-600-normal.952d2591.woff 64.68 KiB
../dist/assets/poppins-all-700-normal.282b1ac4.woff 64.08 KiB
../dist/index.html 18.90 KiB
../dist/assets/index.b62803af.js 31.38 KiB / gzip: 10.71 KiB
../dist/assets/index.8e0b01b9.css 11.09 KiB / gzip: 2.42 KiB |
My setup info, i have deleted the entire folder, cloned it afresh, setup the config.json newly as well ❯ node --version
v18.12.1
❯ npm --version
8.19.2
❯ cat package.json
{
"name": "portfolio",
"private": true,
"version": "1.6.0",
"description": "Automatically generates a responsive, static-site with the user’s Github projects.",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"author": "Shaan Subbaiah <[email protected]>",
"license": "MIT",
"dependencies": {
"@fontsource/poppins": "^4.5.10",
"canvas-confetti": "^1.6.0",
"masonry-layout": "^4.2.2"
},
"devDependencies": {
"axios": "^0.21.2",
"dotenv": "^8.2.0",
"fs-extra": "^9.0.1",
"inquirer": "^9.1.4",
"markdown-it": "^12.3.2",
"sharp": "^0.30.2",
"vite": "^3.2.3",
"vite-plugin-handlebars": "^1.6.0"
}
} Build succeeded now, in the latest download of the repo. But the website is still broken because of the following incase of trying to just open the html file in browser. And in case of live deployment at localhost, the following is coming in the console Is this some sort of issue with my browsers privacy settings etc? |
The way I've imported the CSS in
|
Nope, i tried github deploy as well, it doesnt work without the changes i made. @shaansubbaiah as per docs what you have done is techincally right, but it isnt working as expected for me. |
This is hard for me to debug since I am not a js dev, and there is no mention or location of error here.
Steps to reproduce
System info
Output logs
The text was updated successfully, but these errors were encountered: