Open SANKARAMDAS opened 1 year ago
Could you share your package.json and what command you used to create the project?
Did you add the --template typescript
flag when your ran npx create-react-app portfoliov4
?
Hi @Jbonez87, Actually, it's a project I clone from git.. Project link(https://github.com/bashleigh/another-portfolio)
And package.json is - { "name": "another-portfolio", "version": "1.0.0", "repository": "git@github.com:bashleigh/another-portfolio.git", "author": "Aaryanna Simonelli ashleighsimonelli@gmail.com", "license": "MIT", "devDependencies": { "@types/node": "^14.14.21", "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", "prettier": "^2.2.1" }, "browserslist": [ "defaults" ], "dependencies": { "@fortawesome/fontawesome-svg-core": "^1.2.35", "@fortawesome/free-brands-svg-icons": "^5.15.3", "@fortawesome/free-solid-svg-icons": "^5.15.3", "@fortawesome/react-fontawesome": "^0.1.14", "@octokit/core": "^3.2.5", "bulma": "^0.9.1", "gatsby": "^2.30.3", "gatsby-image": "^2.9.0", "gatsby-plugin-google-gtag": "^2.7.0", "gatsby-plugin-react-helmet": "^3.9.0", "gatsby-plugin-react-svg": "^3.0.0", "gatsby-plugin-sass": "^3.0.0", "gatsby-plugin-sharp": "^2.12.2", "gatsby-plugin-typescript": "^2.10.0", "gatsby-source-filesystem": "^2.9.1", "gatsby-transformer-sharp": "^2.10.1", "node-sass": "^5.0.0", "react": "^17.0.1", "react-dom": "^17.0.1", "react-helmet": "^6.1.0", "react-highlight-words": "^0.17.0", "react-swipeable": "^6.0.1", "shleemy": "^1.2.2", "typescript": "^4.1.3" }, "scripts": { "start": "gatsby develop", "serve": "gatsby serve", "build": "gatsby build", "develop": "gatsby develop", "dev": "gatsby develop", "format": "prettier --write \"*/.{js,jsx,ts,tsx,json,md}\"" } }
I see. Well what happens when you run yarn build
? It looks like it's not compiling index.tsx
to index.js
.
Yarn build - ERROR
[object Object] Processing E:/VS Code Project/another-portfolio-4/src/images/fordandsons.png failed
Original error:
Command failed with ENOENT: E:\VS Code
Project\another-portfolio-4\node_modules\pngquant-bin\vendor\pngquant.exe - --strip
--quality 50-75
spawn E:\VS Code
Project\another-portfolio-4\node_modules\pngquant-bin\vendor\pngquant.exe ENOENT
'E:\VS Code
Project\another-portfolio-4\node_modules\pngquant-bin\vendor\pngquant.exe' is not
recognized as an internal or external command,
operable program or batch file.
WorkerError: Processing E:/VS Code Project/another-portfolio-4/src/images/fordandso ns.png failed Original error: Command failed with ENOENT: E:\VS Code Project\another-portfolio-4\node_modules\png quant-bin\vendor\pngquant.exe - --strip --quality 50-75 spawn E:\VS Code Project\another-portfolio-4\node_modules\pngquant-bin\vendor\pngqu ant.exe ENOENT 'E:\VS Code Project\another-portfolio-4\node_modules\pngquant-bin\vendor\pngquant.e xe' is not recognized as an internal or external command, operable program or batch file.
jobs-manager.ts:318 enqueueJob [another-portfolio-4]/[gatsby]/src/utils/jobs-manager.ts:318:21
task_queues:95 processTicksAndRejections node:internal/process/task_queues:95:5
If I run gatsby develop, It's showing - warn Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
ERROR
error:0308010C:digital envelope routines::unsupported
Error: error:0308010C:digital envelope routines::unsupporte d
hash:71 new Hash node:internal/crypto/hash:71:19
node:crypto:133 Object.createHash node:crypto:133:10
createHash.js:135 module.exports [another-portfolio-4]/[webpack]/lib/util/createHash.js:13 5:53
NormalModule.js:417 NormalModule._initBuildHash [another-portfolio-4]/[webpack]/lib/NormalModule.js:417:1 6
NormalModule.js:452 [another-portfolio-4]/[webpack]/lib/NormalModule.js:452:1 0
NormalModule.js:323 [another-portfolio-4]/[webpack]/lib/NormalModule.js:323:1 3
LoaderRunner.js:367 [another-portfolio-4]/[loader-runner]/lib/LoaderRunner.js :367:11
LoaderRunner.js:233 [another-portfolio-4]/[loader-runner]/lib/LoaderRunner.js :233:18
LoaderRunner.js:111 context.callback [another-portfolio-4]/[loader-runner]/lib/LoaderRunner.js :111:13
index.js:59 [another-portfolio-4]/[babel-loader]/lib/index.js:59:103
I already update npx browserslist@latest --update-db, still throwing the same error.
Even if I delete the node_module folder and clear the cache, and start yarn from starting, the same error is throwing.
After creating a react app using file extension tsx, > yarn start - showing error(images) - " yarn start yarn run v1.22.19 $ react-scripts start Could not find a required file. Name: index.js Searched in: E:\VS Code Project\portfoliov4\src error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ation about this command. "
Any Idea what's the issue?