I use yarn create next-app for my nextjs in react project.But next-auth is not
installed in my project. My node version is LTS 16.15.1
and yarn version is 1.22.18, npm version is 8.9.0. I tried in latest version and old
version of nodejs but I am getting this error again and again.Kindly resolve my issue
how to install next-auth in my project.
yarn add v1.22.18
warning ../../../package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
error next-auth#4.3.4: The engine "node" is incompatible with this module.
Expected version "^12.19.0 || ^14.15.0 || ^16.13.0". Got "18.2.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this
command.
Got it from #pfcodes:
Add --ignore-engines flag for install and upgrade operations to get around this for now. here
I have added a package(X) as follows in package.json file
package(X): "^5.0.0"
now the latest version of package(X) is 5.0.1. According to my understanding this should install 5.0.1 but it installs version 5.0.0 itself.
Now I have multiple angular projects which are using package(X) and each of them have the same setup. What surprises me is that it works absolutely fine i.e installs version 5.0.1 in some projects and does not in some projects
Here is the info about package(x)
npm library info
It does depend on other packages' dependencies.
If there is a package that requires X to be exactly 5.0.0, then it will install 5.0.0 as it will satisfy ^5.0.0.
If there isn't one, then it will install whichever latest that will satisfy ^5.0.0 which is 5.0.1 in this case.
If I do ionic generate component xxx
An unhandled exception occurred: Cannot find module '#schematics/angular/utility/project'
Require stack:
/Users/user/develop/myapp/node_modules/#ionic/angular-toolkit/schematics/component/index.js
/Users/user/develop/myapp/node_modules/#angular-devkit/schematics/tools/export-ref.js
/Users/user/develop/myapp/node_modules/#angular-devkit/schematics/tools/index.js
/Users/user/develop/myapp/node_modules/#angular/cli/utilities/json-schema.js
/Users/user/develop/myapp/node_modules/#angular/cli/models/command-runner.js
/Users/user/develop/myapp/node_modules/#angular/cli/lib/cli/index.js
/Users/user/develop/myapp/node_modules/#angular/cli/lib/init.js
/Users/user/develop/myapp/node_modules/#angular/cli/bin/ng
Ionic:
Ionic CLI : 6.10.1 (/usr/local/lib/node_modules/#ionic/cli)
Ionic Framework : #ionic/angular 5.2.3
#angular-devkit/build-angular : 0.1000.2
#angular-devkit/schematics : 10.0.2
#angular/cli : 10.0.2
#ionic/angular-toolkit : 2.2.0
Capacitor:
Capacitor CLI : 2.1.2
#capacitor/core : 2.1.2
Cordova:
Cordova CLI : 9.0.0 (cordova-lib#9.0.1)
Cordova Platforms : android 8.1.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 7 other plugins)
Utility:
cordova-res : not installed
native-run : not installed
System:
ios-sim : 8.0.2
NodeJS : v12.18.1 (/usr/local/bin/node)
npm : 6.14.6
OS : macOS Catalina
Xcode : Xcode 11.5 Build version 11E608c
Seems like it's an ionic incompatibility with angular 10+
THIS WORKED FOR ME
npm uninstall #schematics/angular
npm install #schematics/angular#9.1.0
You may first proceed with npm uninstall #schematics/angular and TERMINAL informs that "removed XX packages and audited XXXX packages" etc, then you may implement npm install #schematics/angular#9.1.0.
Accordingly, ng add ngx-bootstrap provides:
✅️ Added "bootstrap
✅️ Added "ngx-bootstrap
In my case it was to have this:
"#ionic/angular-toolkit": "^2.3.3"
instead of "^2.2.0"
My Angular: 10.1.4.
I found this out by creating fresh Ionic project after upgrading Ionic CLI to newest.
The problem is schematics module incompatibility.
Find out the version of the #schematics/angular
node_modules/#schematics/angular/package.json/#_from
Find out the version of #schematics/angular which used in the #ionic/angular-toolkit module.
node_modules/#ionic/angular-toolkit/package.json
// package.json
"dependencies": {
"#schematics/angular": "^11.2.4",
}
Make sure the versions are matching.
If the versions do not match, then install the matching version of #schematics/angular.
Have an awesome day!
can you please try to run ng add #angular/pwa#13?
Try the code below
npm install #angular-devkit/schematics #angular-devkit/core #schematics/angular
This worked for me.
npm i --save-dev #nativescript/schematics
In my case, after failing with all kind of suggestions.
I update npm: https://www.hostingadvice.com/how-to/update-node-js-latest-version/
Later on Angular: https://update.angular.io/?v=13.0-14.0
and Ionic: https://ionicframework.com/docs/intro/upgrading-to-ionic-6
It works!!
I have an angular project version:
#angular-devkit/architect 0.901.1
#angular-devkit/core 9.1.1
#angular-devkit/schematics 9.1.1
#schematics/angular 9.1.1
#schematics/update 0.901.1
rxjs 6.5.4
After executing:
#auth0/angular-jwt
I can not compile my project and it gives this error:
ERROR in The target entry-point "#auth0/angular-jwt" has missing dependencies:
- tslib
- #angular/core
- rxjs/operators
- rxjs
- #angular/common/http
I am very new at angular, please help me. I already executed these commands:
npm install --save "package names"
but they gave errors.
I had this same problem. As we are using the version of angular 9, we have to install version 4.2.0 of angular-jwt. According to their site:
https://www.npmjs.com/package/#auth0/angular-jwt
# auth0 / angular-jwt v5 is to be used with Angular v10 + and RxJS v6 +. For Angular v6 + to v9, use # auth0 / angular-jwt v4
So:
Uninstall #auth0 (npm uninstall #auth0/angular-jwt)
Deleted the package-LOCK.json folder
Ran the compatible installation #auth for angular 9 (npm install #auth0/angular-jwt#4.2.0)
Now when I ran the ng serve it ran normally.
I hope I helped you. ;)
I know that there is already questions like this that has answers to it, but i tried the most common solutions and i have been unsuccessful.
I'm cloning an angular 4 project from github and i do an npm install and i get this error when i run ng serve.
Local workspace file ('angular.json') could not be found. Error: Local
workspace file ('angular.json') could not be found.
at WorkspaceLoader._getProjectWorkspaceFilePath (/Users/poweruser/Applications/nodework/angular4-file-upload/node_modules/#angular/cli/models/workspace-loader.js:37:19)
at WorkspaceLoader.loadWorkspace (/Users/poweruser/Applications/nodework/angular4-file-upload/node_modules/#angular/cli/models/workspace-loader.js:24:21)
at BuildCommand._loadWorkspaceAndArchitect (/Users/poweruser/Applications/nodework/angular4-file-upload/node_modules/#angular/cli/models/architect-command.js:180:32)
at BuildCommand. (/Users/poweruser/Applications/nodework/angular4-file-upload/node_modules/#angular/cli/models/architect-command.js:47:25)
at Generator.next ()
at /Users/poweruser/Applications/nodework/angular4-file-upload/node_modules/#angular/cli/models/architect-command.js:7:71
at new Promise ()
at __awaiter (/Users/poweruser/Applications/nodework/angular4-file-upload/node_modules/#angular/cli/models/architect-command.js:3:12)
at BuildCommand.initialize (/Users/poweruser/Applications/nodework/angular4-file-upload/node_modules/#angular/cli/models/architect-command.js:46:16)
at Object. (/Users/poweruser/Applications/nodework/angular4-file-upload/node_modules/#angular/cli/models/command-runner.js:87:23)
My node version is
v8.11.2
My angular version is
Angular CLI: 6.0.8
Node: 8.11.2
OS: darwin x64
Angular: 4.1.3
Any suggestions on what i should do ?
Try downgrading your project version of angular-cli to a version that's compatible with ng4...or upgrade the ng4 app to ng6