Closed jerviechronix closed 1 year ago
Hi jerviechronix, in the main folder execute the following command: npm i --save-dev @types/node
(on Terminal).
The command npm i --save-dev @types/node
is used to install TypeScript type definitions for the Node.js runtime environment as a development dependency in a Node.js project. This should solve the issue.
In any other case, update your node version and try a fresh install. (npm update
).
If this solved your problem, below the comment, please click Mark as answer 👍
I get a different error message when trying to npm install.
At the main folder execute the following command in Terminal: npm i --legacy-peer-deps
.
Wow! It works. Thank you!!!
My pleasent jerviechronix, thus command install (or update) all the dependencies in package.json
file.
Please mark my comment as an answer 👍
At the main folder execute the following command in Terminal:
npm i --legacy-peer-deps
.
Hi ladunjexa, thanks a lot for guiding here, it worked after running with npm i --legacy-peer-deps
One more request could you suggest a free hosting platform to host this website, I am already using the Fleek for some react only portfolio webiste.
Sorry to ask you basics, but kindly provide 3 to 4 steps how I can host this with these 2 options. I have uploaded this to Github already
At this case, the website is frontend-only, so you don't have to use render.com. To deploy this website on vercel, follow this video.
obsolutely @ladunjexa i have never seen a faster reply than this, it is really privilege to use your code and project !!!
Hi @ladunjexa , tried it on vercel, i get the following error during deployment
[07:24:02.510] Running build in Cleveland, USA (East) – cle1
[07:24:02.566] Cloning github.com/manjubluemoon/Threejs-3D-Portfolio (Branch: main, Commit: 4503894)
[07:24:02.819] Previous build cache not available
[07:24:06.900] Cloning completed: 4.334s
[07:24:07.790] Running "vercel build"
[07:24:08.268] Vercel CLI 30.2.1
[07:24:08.813] Installing dependencies...
[07:24:10.365] npm notice
[07:24:10.366] npm notice New minor version of npm available! 9.5.0 -> 9.7.1
[07:24:10.366] npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.7.1
[07:24:10.366] npm notice Run npm install -g npm@9.7.1
to update!
[07:24:10.366] npm notice
[07:24:10.367] npm ERR! code ERESOLVE
[07:24:10.370] npm ERR! ERESOLVE could not resolve
[07:24:10.370] npm ERR!
[07:24:10.370] npm ERR! While resolving: react-tilt@0.1.4
[07:24:10.370] npm ERR! Found: react@18.2.0
[07:24:10.370] npm ERR! node_modules/react
[07:24:10.370] npm ERR! react@"^18.2.0" from the root project
[07:24:10.370] npm ERR! peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" from @react-spring/animated@9.6.1
[07:24:10.370] npm ERR! node_modules/@react-spring/animated
[07:24:10.370] npm ERR! @react-spring/animated@"~9.6.1" from @react-spring/core@9.6.1
[07:24:10.370] npm ERR! node_modules/@react-spring/core
[07:24:10.370] npm ERR! @react-spring/core@"~9.6.1" from @react-spring/three@9.6.1
[07:24:10.370] npm ERR! node_modules/@react-spring/three
[07:24:10.371] npm ERR! @react-spring/three@"~9.6.1" from @react-three/drei@9.74.15
[07:24:10.371] npm ERR! node_modules/@react-three/drei
[07:24:10.371] npm ERR! @react-spring/animated@"~9.6.1" from @react-spring/three@9.6.1
[07:24:10.371] npm ERR! node_modules/@react-spring/three
[07:24:10.371] npm ERR! @react-spring/three@"~9.6.1" from @react-three/drei@9.74.15
[07:24:10.371] npm ERR! node_modules/@react-three/drei
[07:24:10.371] npm ERR! @react-three/drei@"^9.56.24" from the root project
[07:24:10.371] npm ERR! 17 more (@react-spring/core, @react-spring/shared, ...)
[07:24:10.371] npm ERR!
[07:24:10.371] npm ERR! Could not resolve dependency:
[07:24:10.371] npm ERR! peer react@"^15.0.0 || ^16.0.0-beta || ^16.0.0" from react-tilt@0.1.4
[07:24:10.371] npm ERR! node_modules/react-tilt
[07:24:10.371] npm ERR! react-tilt@"^0.1.4" from the root project
[07:24:10.371] npm ERR!
[07:24:10.371] npm ERR! Conflicting peer dependency: react@16.14.0
[07:24:10.371] npm ERR! node_modules/react
[07:24:10.371] npm ERR! peer react@"^15.0.0 || ^16.0.0-beta || ^16.0.0" from react-tilt@0.1.4
[07:24:10.372] npm ERR! node_modules/react-tilt
[07:24:10.372] npm ERR! react-tilt@"^0.1.4" from the root project
[07:24:10.372] npm ERR!
[07:24:10.372] npm ERR! Fix the upstream dependency conflict, or retry
[07:24:10.372] npm ERR! this command with --force or --legacy-peer-deps
[07:24:10.372] npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
[07:24:10.372] npm ERR!
[07:24:10.372] npm ERR!
[07:24:10.372] npm ERR! For a full report see:
[07:24:10.372] npm ERR! /vercel/.npm/_logs/2023-06-18T01_54_09_103Z-eresolve-report.txt
[07:24:10.373]
[07:24:10.373] npm ERR! A complete log of this run can be found in:
[07:24:10.373] npm ERR! /vercel/.npm/_logs/2023-06-18T01_54_09_103Z-debug-0.log
[07:24:10.387] Error: Command "npm install" exited with 1
[07:24:10.780] BUILD_UTILS_SPAWN_1: Command "npm install" exited with 1
@manjubluemoon Open a new issue.
Done, created new - https://github.com/ladunjexa/Threejs-3D-Portfolio/issues/11
This is the error i got.
/usr/local/Cellar/vite/4.1.4/libexec/lib/node_modules/vite/bin/vite.js:2 import { performance } from 'node:perf_hooks' ^^^^^^
SyntaxError: Unexpected token import at new Script (vm.js:51:7) at createScript (vm.js:138:10) at Object.runInThisContext (vm.js:199:10) at Module._compile (module.js:626:28) at Object.Module._extensions..js (module.js:673:10) at Module.load (module.js:575:32) at tryModuleLoad (module.js:515:12) at Function.Module._load (module.js:507:3) at Function.Module.runMain (module.js:703:10) at startup (bootstrap_node.js:193:16)