After make an npm update the console shows Error: Module not found: Error: Can't resolve 'angular2-moment' - angular2-moment

I was trying to install jquery on my Angular project and after write some jquery dependency on package.json doc and type npm update, the console says Error: Module not found: Error: Can't resolve 'angular2-moment'.
Error occurs in the template of component RegisterComponent.
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
× Failed to compile.
✔ Browser application bundle generation complete.
Initial Chunk Files | Names | Raw Size
main.js | main | 83.62 kB |
runtime.js | runtime | 6.51 kB |
4 unchanged chunks
Build at: 2023-01-10T02:39:00.432Z - Hash: 2a1b1b37176d6913 - Time: 536ms
./src/app/app.module.ts:7:0-47 - Error: Module not found: Error: Can't resolve 'angular2-moment' in 'C:\Users\xxxxxx\Desktop\Proyectos IT\registro_cintas\client\src\app'
Error: src/app/app.component.html:6:34 - error NG8002: Can't bind to 'routerLink' since it isn't a known property of 'a'.
6 <a class="link-home" [routerLink]="['/home']">
continue...
~~~~~~~~~~~~~~~~~~~~~~~~
I tryed installing ngx-moment, angular2-moment again or uninstalling this last one algo I erase the entire folder and made a git clone from the last working commit but nothing, I think the angular2-moment it's not compatible with my Angular version but I don't know what to do.

Related

npm - gulp-sass no longer has a default Sass compiler; please set one yourself

Keep getting this error when trying to build templates
[09:21:08] Requiring external module babel-register
[09:21:19] Using gulpfile ~/GIT/Newsletters/gulpfile.babel.js
[09:21:19] Starting 'build'...
[09:21:19] Starting 'clean'...
[09:21:19] Finished 'clean' after 5.98 ms
[09:21:19] Starting 'pages'...
[09:21:20] Finished 'pages' after 1.96 s
[09:21:20] Starting 'sass'...
Error in plugin "gulp-sass"
Message:
gulp-sass no longer has a default Sass compiler; please set one yourself.
Both the "sass" and "node-sass" packages are permitted.
For example, in your gulpfile:
const sass = require('gulp-sass')(require('sass'));
When I then add const sass = require('gulp-sass')(require('sass')); in my gulpfile.js
It gives this error
[09:41:01] Requiring external module babel-register
{ TypeError: /Users/lde4k1v/GIT/Newsletters/gulpfile.babel.js: Duplicate declaration "sass"
76 |
77 | // Compile Sass into CSS
> 78 | function sass() {
| ^
79 | return gulp.src('src/assets/scss/app.scss')
80 | .pipe($.if(!PRODUCTION, $.sourcemaps.init()))
81 | .pipe($.sass({
Here is my full gulpfile.babel.js
Can someone help me out :( already searched quite some time on it and can't find seem to fix it sadly

"Tried to resolve a name to a reference that was unknown to the frame" error when running dbt seed

dbt version: 0.20.1
database: postgresql
code: https://github.com/josephmachado/simple_dbt_project
when running the command "dbt seed", it raises error:
Unhandled error while executing seed.tutorial.customer
Tried to resolve a name to a reference that was unknown to the frame ('column')
19:17:41 | 1 of 3 ERROR loading seed file tutorial.customer..................... [ERROR in 3.61s]
19:17:41 | 3 of 3 START seed file tutorial.state................................ [RUN]
Unhandled error while executing seed.tutorial.state
Tried to resolve a name to a reference that was unknown to the frame ('column')
19:17:41 | 3 of 3 ERROR loading seed file tutorial.state........................ [ERROR in 0.23s]
Unhandled error while executing seed.tutorial.orders
Tried to resolve a name to a reference that was unknown to the frame ('column')
19:17:51 | 2 of 3 ERROR loading seed file tutorial.orders....................... [ERROR in 14.37s]
19:17:51 |
19:17:51 | Finished running 3 seeds in 14.96s.
Completed with 3 errors and 0 warnings:
Tried to resolve a name to a reference that was unknown to the frame ('column')
Tried to resolve a name to a reference that was unknown to the frame ('column')
Tried to resolve a name to a reference that was unknown to
the frame ('column')
Any setting i am missing?
how did you install Jinja2? It should be the older version 2.x Normally as you install dbt package, jinja comes with the right(older) version as dependency.
Check your jinja version per command:
pip freeze > temp.txt
if it is not 2.x, You gotta take care of that.
Jinja2==3.0.1 caused this issue. It is fixed after installing Jinja2==2.11.3

"Module build failed..." in Laravel Mix

I did not change anything in app.scss, but when I run npm run watch I get the following errors:
error in ./resources/sass/app.scss
Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Unsupported operation: Cannot extract a file path from a URI with a fragment component
# ./resources/sass/app.scss 2:14-254
Asset Size Chunks Chunk Names
/js/app.js 2.46 MiB /js/app [emitted] /js/app
ERROR in ./resources/sass/app.scss
Module build failed (from ./node_modules/css-loader/index.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/lib/loader.js):
undefined
^
Join(null, "variables"): part 0 was null, but part 1 was not.
#import 'variables';
^^^^^^^^^^^
stdin 2:9 root stylesheet
in C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\resources\sass\app.scss (line 2, column 9)
at runLoaders (C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\webpack\lib\NormalModule.js:30
at C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\loader-runner\lib\LoaderRunner.js:364:11
at C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\loader-runner\lib\LoaderRunner.js:230:18
at context.callback (C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\loader-runner\lib\Loader
13)
Any help appreciated.
Finally found the issue. It is related to dart-sass being used instead of node-sass with laravel-mix v4.x.x.
Turns out something related to dart-sass or laravel-mix does not work well with paths containing a '#' symbol. In your case, your app is located at C:\Users\TAQI VAHEED\Desktop\#Coding\resPro and the #Coding folder is creating the error.
Either move your app somewhere else without a '#' symbol in the path OR enable node-sass again by following the steps from laravel-mix 4.0.0 release notes:
you can manually switch back to node-sass, like so:
npm install node-sass
mix.sass('resources/sass/app.sass', 'public/css', {
implementation: require('node-sass')
});
in your webpack.mix.js write the code
mix.js('resources/js/app.js', 'public/js')
.postCss('resources/css/app.css', 'public/css');

Errors after installing '#babel/preset-env'

when I was trying to start my npm project I got the following error:
/home/projects/reactive-weather/reactive-weather/app/node_modules/expo/src/Location.js:
Cannot find module '#babel/preset-env' from '/home/projects/reactive-weather/reactive-weather/app'
Surely I need to install this module but after I did, I'm getting this error:
Error: /home/projects/reactive-weather/reactive-weather/app/node_modules/expo/src/Location.js: Unexpected token, expected ";" (9:5)
7 | const LocationEventEmitter = new NativeEventEmitter(NativeModules.ExponentLocation);
8 |
> 9 | type ProviderStatus = {
| ^
10 | locationServicesEnabled: boolean,
11 | gpsAvailable: ?boolean,
12 | networkAvailable: ?boolean,
10:43:44 AM: Failed building JavaScript bundle
Everything was perfectly fine, the last thing I've done before this happened was using git commands like: git stash also I had to perform npm audit fix but I don't think any libs were vulnerable.

elm-make.exe: getFileAttributesExStandard: does not exist

I followed the instructions to get the latest version of debois/elm-mdl here.
After using elm-github-install to install v9, my app does not want to compile any more. I get the following error:
11:42:35 PM client.1 | Module build failed: Error: Compiler process exited with error Compilation failed
11:42:35 PM client.1 | elm-make.exe: getFileAttributesExStandard: does not exist (The system cannot find the path specified.)
Eventually what worked was to delete the elm-stuff folder and reinstall everything using elm-install.