-
-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find module '@schematics/angular/utility/json-utils' #597
Comments
same error...😭 |
which version of |
|
I would like to confirm that I am getting this exact same error. Installing via npm isn't an option for me as I plan on changing the things like the user profile page to match my requirements.
Is my version information. |
When using a different schematics version the output looks different but still gets stuck with a different errror
So this is related to schematics version, I've tried 11.0.3/11.0.2/11.0.1 - Same |
I want to use this library as well, so I did some digging. Turns out the folks over on the angular/cli repo actually deleted the files. Here is the PR: angular/angular-cli#18875 Given the merge date of Sept 24th, it was probably merged into one of the 11.0 pre-release builds. Which means you would need to use angular/cli 10.x in order for this library to continue to work. |
Same issue with Ubuntu 20.04 LTS and schematics 11.0.4. Wanted to use this library which looks super cool ! ng version output :
|
This library creates a wrapper around json-utils.ts. Since that file has now been deleted from the Minimal steps would be to increase the dependency of |
I'm having the same issue |
I tried with @angular/cli & @schematics/angular versions of 10.2.1 and it was able to progress to the "Installing packages..." portion but then it fails with "Cannot read property 'defaultProject' of undefined |
@andresrivero in my personal fork of this repo, I was able to remove the json-utils reference (which worked to remove the main issue), however just as you did, I also ran into the issue of 'Cannot read property 'defaultProject' of undefined. Upon further investigation into this I was able to find where the problem was occurring, but not why. Inside a typescript file: projects\ngx-auth-firebaseui\schematics\ng-add\index.ts there is a function that handles the imports. It's here where the problem lies.
the function 'getProjectFromWorkspace()' is coming from angular, however, it would appear the package it comes from should be considered an internal package and shouldn't be used incase there are changes. When I print out the value of 'project', I get undefined. So I don't know where we are supposed to define this project (I tried in the angular.json file, but that didn't seem to work for me). If no value is provided the method sets a default.
I have no idea how the schematics library is defining the value of defaultProject...but it is clear this is the source of the problem. |
I just used the forced npm install of each package to bypass the error for now, if I have a moment maybe I can follow your direction and see how the project name issue can be fixed. |
Does someone have the time to improve that via an appropriate PR ? |
Can someone test the schematics with the latest version, please? |
@AnthonyNahas , I ran a clean test using the following Here are the commands I ran to get the below output
I get the following output when I try to install ngx-auth-firebaseui ` The package ngx-auth-firebaseui@7.1.0 will be installed and executed. Not sure what the error means...but I believe all further steps are halted.
|
Bug Report or Feature Request (mark with an
x
)OS and Version?
Catalina 10.15.7
Versions
Angular CLI: 11.0.2
Node: 14.14.0
OS: darwin x64
Repro steps
From the CLI, enter
ng add ngx-auth-firebaseui
The log given by the failure
Installing packages for tooling via npm.
Installed packages for tooling via npm.
An unhandled exception occurred: Cannot find module '@schematics/angular/utility/json-utils'
Require stack:
See "/private/var/folders/dv/x8kx3wkj0tj08gcq1csnk4jm0000gp/T/ng-fuBnGr/angular-errors.log" for further details.
Desired functionality
I want to install ngx-auth-firebaseui.
Mention any other details that might be useful
First time using this package. I'll try installing with npm.
The text was updated successfully, but these errors were encountered: