So I was going to work on an Ionic app that I was working on last year and I didn't change anything in framework or anything. So I launch the command "ionic serve" and my app crashes saying a lot of imports don't work like in the picture:
I've tried installing rxjs-compat (even though I haven't updated rxjs) and still doesn't work.
I just did "npm i" just in case something was missing and then launched my app.
Does anyone know what could be the reason that is making everything crash?
Looks like you got unexpected updates.
Please check root directory of your project, if npm i didn't work it means you don't have package-lock.json. If you have it - try to delete node_modules and execute npm install again.
Also check whether yarn.lock is there, then you need to use yarn to install proper packages.
Without yarn.lock and package-lock.json you can only guess suitable versions.
If you remember a date when it worked - try to check which versions were actual then on http://npmjs.com/ and specify them explicitly in the packages.json without ^ or ~ prefix.
Related
I am using React Native and encountered the following error on my android emulator
I am new to React Native and was coding in App.js. I watched a tutorial online on how to use react-navigation so I was following it and created a homestack.js file. My app.js file was still working perfectly fine at this point.
I added code to homestack.js and then imported it to my app.js file but that's when this error popped up. This error was not resolved when I commented out all of the code on homestack.js nor when I commented out the import on my app.js file.
I followed the instructions on the error (clear watchman, delete node modules, yarn install, yarn reset cache) but this also did not resolve the issue.
The fix:
Since none of the above fixed the issue, I removed the homestack.js file from my root folder completely which then fixed the issue. What I did not expect however was that when I put the homestack.js file back into the root folder to see what would happen, the app ran again fine with no issues. It was as if the error never happened.
I guess my question is, what was the actual issue here? Why did taking the file out of the folder and then placing it back in fix the issue? I ran 'npx react-native run-android' after every step of the above fix process so the issue was not because the emulator was running an old version.
Following this error, You have imported react-navigation-stack without install the package. You can install the packge
yarn add react-navigation-stack #react-native-community/masked-view react-native-safe-area-context
or
npm install react-navigation-stack #react-native-community/masked-view react-native-safe-area-context
To know more https://www.npmjs.com/package/react-navigation-stack
After install the package clean project by executing command cd android && gradlew clean, then debug your project.
I'm getting an extremely weird error when trying to npm start my loopback application. I literally did nothing to the code and then this all of a sudden started to happen
Cannot start the application. TypeError: Cannot read property
'definition' of undefined
at getFieldsJsonSchemaFor (/Users/vikramkhemlani/Desktop/loopback/node_modules/#loopback/repository-json-schema/dist/filter-json-schema.js:101:64)
I have the same exact code in another file (which i actually created a git repo from using this repo) but this one is throwing this error for some reason
I went through the same issue.
Apparently there are caches which need to clean up before starting the application. (Expired caches also appear in openapi before I get into this issue)
The project needs to be clean and re-install packages by following:
npm run clean
npm install
I have the same problem.
However, I solved it when I tried the following.
delete node_modules directory.
npm install.
Hello from the LoopBack team 👋
This may be a bug in LoopBack introduced by recent changes. Please create a small application reproducing the problem (see our Bug reporting instructions) and open a new GitHub issue in https://github.com/strongloop/loopback-next/issues/new
I have a serious problem. I tried to install ionic, cordova, angular, react-native-cli, https-status-error and other packages and it always returns:
npm ERR! code E418
npm ERR! 418 I'm a teapot: ionic # latest
Please note that it may be wrong and I do not understand what is happening. It was fine until 3 days ago.
So, post may 29th '18, this is the common error being faced worldwide by devs working behind corporate proxies. The following tweak fixed the issue for me:
Go to your .npmrc file.
you'll have the following similar content in the file depending upon the configs you are setting up-
strict-ssl=false
registry=http://registry.npmjs.org/
python=C:/Python27/python.exe
msvs_version=2015
http-proxy=<WHATEVER-PROXY-YOU-USUALLY-ADD>:8000
Note: Ignore the extra configs like python variable path.
Update the registry link to 'https://registry.npmjs.org/'. So your file would look like this now-
strict-ssl=false
registry=https://registry.npmjs.org/
python=C:/Python27/python.exe
msvs_version=2015
http-proxy=<WHATEVER-PROXY-YOU-USUALLY-ADD>:8000
And Viola! you are all set to fire your npm install commands :)
Work for me!
If you set proxy should be unset.
npm config delete proxy
npm config delete https-proxy
Solution resolve npm ^___^
npm cache clean --force
npm cache verify
I had the very same issue and managed to fix it.
In my case, I initially had the value of "http://registry.npmjs.org/" and changed it to "https". Below are the set of commands I ran:
npm config set registry https://registry.npmjs.org/
npm cache clean --force
npm cache verify
npm install
we have to add proxy information in .npmrc file with userid and password. You will not find any issues. Recently people are getting http 418 - tea pot issues. That we can fix setting up registry with https like below
USE THIS:
proxy=http://<>:<>#<>:8080/
https-proxy=http://<>:<>#<>:8080/
registry=https://registry.npmjs.org
Are you behind a coorporate proxy? I was facing the same error when I tried to run npm install. What I did was to remove the proxy configuration from NPM, like so:
npm config rm proxy
npm config rm https-proxy
That did the trick.
418 I’m a teapot: This code was defined in 1998 as one of the traditional IETF April Fools’ jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol, and is not expected to be implemented by actual HTTP servers.
However, we know at least one implementation does exist now.
It's a bug or weird joke.
As #TomLingham suggested, follow https://github.com/npm/npm/issues/20791 to watch progress resolving the issue and for some workarounds.
For example yarn still healthy.
After visiting many sites and testing everything i found,
This Solution finally worked for me. If you are using Windows,
Click windows button and type "run"
Type .npmrc and open this file using your favorite editor.
Replace "registry=http://registry.npmjs.org/" with "registry=https://registry.npmjs.org/" and save.
Note: If you have any proxy issues too..you can set your proxy like below in the same file. In my case i have a special symbol "#" in my password.
When i tried changing proxy using npm config set proxy command these special characters got converted to something else :) So you could eliminate all these headaches if you set your proxy along in this file directly.
Your final .npmrc should look like below. you could remove proxy lines if you do not have any issues with proxy and do not forget to replace the port in below example with your proxy port.
registry=https://registry.npmjs.org/
proxy=http://username:password#yourproxy.net:8080/
https-proxy=http://username:password#yourproxy.net:8080/
strict-ssl=false
I too ran into the same problem today, It looks like we all are in the same boat.
https://github.com/npm/npm/issues/20791. Some solutions are provided in the link. You might want to look into it if it is a pressing issue.
I keep getting this error recently when I did a pod update, pod install and then executed my test cases using EarlGrey.
And when I try to resolve the path with terminal, I do not have anything in that path, nor do I have a EarlGrey-1.0.0 in my system.
The answer for the same seems to be a simple one.
Although had to struggle a lot to find and a lot of going back and forth with EarlGrey dev team.
First step is to fix the 'podfile'.
Details below:
My podfile used to look like this while I encountered the problem.
And couldn't possibly figure out. Deleted 'Podfile.lock' and 'Pods' folder repeatedly and performed 'Pod update' and 'Pod install'. No luck.
Then I tried changing the path in "EarlGrey Copy Files" in Build Phases by browsing the 'framework' directly from my finder. Although that could solve my problem temporarily, it wasn't permanent. I checked my schemes to make sure if nothing got messed up there!
If all these are intact, then the problem is with podfile. As per the instructions mentioned here: https://github.com/google/EarlGrey/blob/master/docs/install-and-run.md#step-2-add-earlgrey-as-a-framework-dependency
or have a look at my fixed podfile below:
Add this line as mentioned in the post install hook. Then do a pod install and clean build, should fix the problem.
although the above change may fix the problem, but after earlgrey gem 0.2 release, the integration process should be a lot smoother w/o any post_install or require in your Podfile.
for more info here
I'm doing some web development and I did a commit & sync via GitHub's Mac GUI, then I installed some Mac updates that required a restart (I don't know what the updates were). When I opened my project in PHPStorm again, I found this error when I tried compiling my TypeScript:
/usr/local/bin/tsc
env: node: No such file or directory
I know the compilation was working before. My web application had no issues. This question deals specifically with me being able to do this yesterday, with no changes to the FileWatcher configuration.
I have my TypeScript Compiler in usr/local/bin/tsc (which I have checked as a valid path to a typescript compiler alias). When I click on the alias, It opens a terminal window and runs typescript, so I know it's there. PHPStorm also complains if I try to change the file path, saying I must pick a valid executable.
I modified my Environment Variables on the advice of Dan Clark's site but that hasn't changed anything. I don't have the reputation to upload a photo of my File Watchers Dialog.
Does anyone know why I am getting this error, and how it can be fixed? I mention GitHub because that's the last thing I did before things stopped working: a commit & sync, then a restart to install some Mac updates.
Both which node and which tsc point in the right direction. Just tsc also works.
My solution was to use the directory of the actual TypeScript compiler at /usr/local/lib/node_modules/typescript/bin/tsc
instead of
/usr/local/bin/tsc, which is the alias.
That lets me compile using the FileWatcher.
As for why this happened, it's still a mystery to me.