I installed sanity.io using npm after which my main NextJS app is showing errors when trying to run it on localhost - next.js

This is the error I am getting on browser when trying to run my NextJS app which was running fine until I installed sanity.io using npm. There was a new folder created for sanity in my nextjs app which had its own node_modules, I tried going back to when my app was working fine by deleting this sanity folder from my nextjs app. I also tried deleting the node_module folder which originally was present in my next js folder and then ran npm install, however, that does not seem to solve the problem.
Also getting this error in terminal:

Related

I want to open this already created next.js file locally using yarn

I try so many time but it's not working,
I try yarn install to install the yarn first, but it's not installing.
then I try yarn add and then yarn install, but still it's not working. I try next dev. cause I was thinking maybe that's how a next.js file open. but it's still not working.
give me a solution please
and one things, I was trying to create an next.js file but it's not opening. I try this code
yarn create next-app myapp
but it's not working, it's says this error
Usage Error: The nearest package directory (C:\Users\Intel Pc\Downloads\New folder\myapp) doesn't seem to be part of the project declared in C:\Users\Intel P
part of the project declared in C:\Users\Intel Pc.
- If C:\Users\Intel Pc isn't intended to be a project, remove any yarn.lock and/or package.json file there.
- If C:\Users\Intel Pc is intended to be a project, it might be that you forgot to list Downloads/New folder/myapp in its workspace configuration.myapp in its workspace configuration. ly separate project (not even a workspace), crea
- Finally, if C:\Users\Intel Pc is fine and you intend Downloads/New folder/myapp to be treated as a completely separate project (not even a workspace), create an empty yarn.lock file in it.
ev] [-i,--interactive] [--cached] [--mode #0] ..
$ yarn add [--json] [-E,--exact] [-T,--tilde] [-C,--caret] [-D,--dev] [-P,--peer] [-O,--optional] [--prefer-dev] [-i,--interactive] [--cached] [--mode #0] ...
Aborting installation.
yarn add --exact --cwd C:\Users\Intel Pc\Downloads\New folder\myapp react react-dom next has failed.
this image for my existing next.js app which I trying to open locally using yarn but it's not working

NextJS stuck at compiling

All of my next apps are getting stuck at event - compiled successfully when I try and run them using yarn dev. Everything from existing apps I've used before to brand new apps I literally make just for trying this fresh.
I've tried deleting node_modules and yarn.lock, running yarn again, then running yarn dev. No dice. I also updated node js to latest and tried a few iterations of the above, including some with a 'yarn build` step to see if that did anything. No luck.
Assuming it's some kind of machine config that got messed up, but I can't for the life of me figure out what it is. Ideas?
replace with it in package.json
“dev”: “next dev -p 1234",

Meteor 1.7 bundler is broken

I am trying to deploy an app that has been upgraded to meteor 1.7 using the setup for passenger outlined at puhsionpasserger.com, however when I try and access the app I get an error in the console of
Error: The core-js npm package could not be found in your node_modules directory. Please run the following command to install it: meteor npm install --save core-js
Being shown on the web page (although the favercon is correct so its trying).
The app runs fine locally (as in on the dev machine).
Give its deployed, meteor doesn't exist on the machine.
I tried npm install --save core.js and it reported one package installed, but still no joy on the app front.
I'm not sure where to go from here. Any thoughts?
Edit:
I just tried building the app without the --server-only flag with no change. Deployed the app the way I do with the v1.3 instances of the app and no change.
One thing that I did get when running npm intall from the /programs/server directory was
Binary is fine; exiting
npm WARN lifecycle meteor-dev-bundle#~install: cannot run in wd %s %s (wd=%s) meteor-dev-bundle# node npm-rebuild.js /opt/bundle/programs/server
added 131 packages in 13.857s
I'm not sure if the warning means anything in particular.

mup deploy works but image won't start

I'm deploying my Meteor app with mup from a Windows 10 box to a Digital Ocean VPS. Latest version of mup, latest version of meteor, app runs fine on Windows and the app deployed and ran fine before adding node-uber NPM. I see the following error in the logs when the app tries to start:
npm ERR! enoent ENOENT: no such file or directory, chmod '/bundle/bundle/programs/server/npm/node_modules/node-uber/node_modules/sshpk/bin\sshpk-conv'
Obviously the problem is with the backslash in the filename, but not sure where that is coming from or how to fix it. It isn't referenced in the package.json for node-uber. I've tried editting the package.json for sshpk on the Windows side, but that doesn't make any difference. I can't edit the file in the Docker container because the container keeps restarting and kicking me out.
Anyone have any suggestions on how to fix this, perferably permanently so I don't have to jump through hoops every time I deploy?
Actually manually editting the package.json file does solve the problem. Turns out I have multiple copies of sshpk installed because the parent NPMs are specifying specific versions as being required.
So the "fix" for this problem is the edit the "bin" section of the sshpk package.json file to flip the "\" to "/", save and rerun mup deploy.
Sigh...

`firebase deploy` just hangs

I'm trying to deploy a site to firebase.
firebase init worked fine. I then ran firebase bootstrap and chose the tetris template. So far so good. But when I run firebase deploy I get Preparing to deploy Public Directory... and then it just hangs forever.
How can I figure out what's going wrong?
Random info in case it helps:
My firebase-tools is version 1.0.1; node is version 0.8.20; npm is version 1.4.23. I ran sudo npm install -g firebase-tools to get the CLI. I'm running on a debian chroot on Android 4.4.3 device. My wifi works fine. On a lark I even tried running sudo firebase deploy in case it depends on ICMP packets or something, but there was no difference.
Firstly, the main reason it's not working is that Node.js version 0.10 or greater is required.
However, even once you've upgraded Node (and I'd recommend getting the latest of firebase-tools too) you're likely to be attempting to deploy the directory that you ran the initial firebase init command from, or at least the folder you specified in the setup (which defaults to the folder you ran the command from).
You should change directory and run the firebase deploy command from the folder that was created by the bootstrap command - which would have been named after the name of the Firebase it was created with, and you can delete the firebase.json file created in the parent directory.
The reason is that firebase init and firebase bootstrap are two different ways of doing the same thing - getting a folder in a deployable state. firebase init is for existing projects with files that will eventually be deployed, and firebase bootstrap is for creating a project from one of the existing templates. By running both, the initial firebase init would have created a firebase.json file containing the settings specified by the prompts, and then the firebase bootstrap command would have created a whole new sub-folder with its own firebase.json for the different settings.

Resources