I did a react project for my bootcamp, and just pulled it down from my github again, after running npm i and npm run-script build I am getting a white screen with 3 errors in the console. 2 of the errors are Uncaught SyntaxError: Unexpected token '<' and the other is Manifest: Line: 1, column: 1, Syntax error.
These errors are not showing on the deployed version, and I am wondering how to get rid of them so I can start working on it on my local host.
Repo: https://github.com/childishmartino/Book-Search-Engine
The structure of your project has three package.json files.
./package.json
./Client/package.json
./Server/package.json
The package.json at the root level has a script install that navigates to the other folders and installs the packages. You should run both npm i at the root to install those packages, and either npm i in each of the sub-folders, or your script, npm run install at the root to install everything required. Then npm run develop to start the applications.
I cloned you project, and was able to run successfully using Node 14.7.4
You should run
npm run install as this is a script that installs the node modules both in the server and client directory.
npm i installs the scripts in the root directory, that's why you get those errors.
Related
[webpack-cli] You need to install 'webpack-dev-server' for running 'webpack serve'.
Error: Cannot find module 'ajv/dist/compile/codegen'
I getting error like this when give npm start in React Application.
Have you checked in your package.json to see if it has been installed? It is common to mispell something on install and have a different package installed. Here is a similar thread
webpack-dev-server isn't working in my project
Trying to my Next.js app using vercel, have tried both the cli and web app. Either way, not working. Error log:
2022-04-18T00:57:21.354Z Retrieving list of deployment files...
2022-04-18T00:57:23.121Z Downloading 29 deployment files...
2022-04-18T00:57:24.298Z Installing build runtime...
2022-04-18T00:57:27.316Z Build runtime installed: 3.018s
2022-04-18T00:57:27.999Z Looking up build cache...
2022-04-18T00:57:28.609Z Build Cache not found
2022-04-18T00:57:28.805Z Installing dependencies...
2022-04-18T00:57:30.687Z npm ERR! code ENOLOCAL
2022-04-18T00:57:30.692Z npm ERR! Could not install from "node_modules/eth-sig-util/ethereumjs-abi#git+https:/github.com/ethereumjs/ethereumjs-abi.git" as it does not contain a package.json file.
2022-04-18T00:57:30.713Z
2022-04-18T00:57:30.713Z npm ERR! A complete log of this run can be found in:
2022-04-18T00:57:30.713Z npm ERR! /vercel/.npm/_logs/2022-04-18T00_57_30_693Z-debug.log
2022-04-18T00:57:30.725Z Error: Command "npm install" exited with 1
2022-04-18T00:57:31.523Z
Not sure what is causing this. I am able to npm run dev on local and everything works correctly. I am also able to npx next build and that works fine too. Any ideas how to fix this issue? Thanks
I am having trouble with creating a react app (windows)
NPM Version: 6.14.11
Node version: 14.15.4
Whenever I run npx create-react-app my-app I am missing the folders that are usually created. I have my node_modules folder and my package and package-lock JSON files, but I am missing everything else (missing src, public, etc).
When I try to run npm start, the script isn't found.
I have already read the Getting Started guide where it says to try npm uninstall -g create-react-app and I have already updated npm and node. I still cannot get these folders to populate. Any ideas?
App was compiling last night when running npm start. This morning it's throwing this error:
Failed to Compile
./src/components/HamButton/styles.scss (./node_modules/css-loader??ref--6-oneOf-5-1!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/lib/loader.js??ref--6-oneOf-5-3!./src/components/HamButton/styles.scss)
To import Sass files, you first need to install node-sass.
Run `npm install node-sass` or `yarn add node-sass` inside your workspace.
Running npm install node-sass didn't fix it.
If I comment out all scss imports, app will compile however styles are not applied.
What's causing this and how can I fix it?
Thanks
Node v10.15.3
npm v6.4.1
Apparently my npm install was corrupt so followed these steps: On npm install: Unhandled rejection Error: EACCES: permission denied
Then installed node-sass and it worked.
Each time i tried creating a react app using create-react-app <...name> i keep getting this error "
Creating a new React app in C:\windows\system32\brian-todos.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
npm ERR! Unexpected end of JSON input while parsing near '...tXcMskoaoOolrubJ3NQGh'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\BrianMartinez\AppData\Roaming\npm-cache_logs\2019-01-12T13_11_25_580Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts has failed.
Deleting generated file... package.json
Deleting brian-todos / from C:\windows\system32
Done."
I even tried npm clear cache it still didn't not work.What do i do about this challenge
It seems you opened your windows console or powershell as an administrator, and you landed in system32 folder. Don't create your project there, that is a reserved folder for system executables. Do something like cd C:\Users\yourusername\Documents and try there.
This is the answer to the challenge i had before now. follow these steps
npm install -g yarn
yarn global add create-react-app
create-react-app