Angular 12: ng serve --open takes too long and have a lot of message - terminal

So I have a previous problem with my angular 12 you can click here for reference
So I kinda fix it now and I can do ng serve --open, but I got this message, maybe an error and it never serve or show the output its just it takes a lot of time.
ERROR:
D:\3rdYR\AppDev\bigProject\public>ng serve public
⠙ Generating browser application bundles (phase: setup)...(node:12832) UnhandledPromiseRejectionWarning: Error: The Angular Compiler requires TypeScript >=4.4.2 and <4.5.0 but 4.3.5 was found instead.
at checkVersion (file:///D:/3rdYR/AppDev/bigProject/public/node_modules/#angular/compiler-cli/bundles/index.js:17440:11)
at verifySupportedTypeScriptVersion (file:///D:/3rdYR/AppDev/bigProject/public/node_modules/#angular/compiler-cli/bundles/index.js:17444:3)
at new NgtscProgram (file:///D:/3rdYR/AppDev/bigProject/public/node_modules/#angular/compiler-cli/bundles/index.js:17594:7)
at AngularWebpackPlugin.updateAotProgram (D:\3rdYR\AppDev\bigProject\public\node_modules\#angular-devkit\build-angular\node_modules\#ngtools\webpack\src\ivy\plugin.js:321:32)
at D:\3rdYR\AppDev\bigProject\public\node_modules\#angular-devkit\build-angular\node_modules\#ngtools\webpack\src\ivy\plugin.js:198:24
at Hook.eval [as call] (eval at create (D:\3rdYR\AppDev\bigProject\public\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:24:1)
at Hook.CALL_DELEGATE [as _call] (D:\3rdYR\AppDev\bigProject\public\node_modules\tapable\lib\Hook.js:14:14)
at Compiler.newCompilation (D:\3rdYR\AppDev\bigProject\public\node_modules\webpack\lib\Compiler.js:1054:30)
at D:\3rdYR\AppDev\bigProject\public\node_modules\webpack\lib\Compiler.js:1099:29
at eval (eval at create (D:\3rdYR\AppDev\bigProject\public\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:31:1)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:12832) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:12832) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
⠼ Generating browser application bundles (phase: setup)...
Right now it is still generating but it is like going on like that for 10 minutes at least.

You have a wrong typescript version installed in your Project.
UnhandledPromiseRejectionWarning: Error: The Angular Compiler requires TypeScript >=4.4.2 and <4.5.0 but 4.3.5 was found instead.
Change in your Package Json your Typescript version to 4.4.2 and npm install than try ng serve again :)

Related

When using "npm run watch" the webpack get compiled with 2 erros and 6 warnings

I'm trying to use Laravel CMS for my portfolio when using the exact same repo on my mac I get no errors or warnings, but when I try using it on my Windows PC I get 6 warning and 2 errors. I'm a beginner level developer, so I don't really know how to read those warnings/errors.
Edit 1:
I forgot to mention that the path i used at first was public/images/<image.png> and the same error occured.
Aplication version's:
Php: 8.1.5
Laravel: 9.11.0
npm: 8.5.5
Here is the error snippet:
npm run watch
> watch
> mix watch
Error: Can't resolve '../../storage/app/resources/images/achtergrond.png' in 'C:\portfolio\resources\css'
at finishWithoutResolve (C:\node_modules\enhanced-resolve\lib\Resolver.js:309:18)
at C:\node_modules\enhanced-resolve\lib\Resolver.js:386:15
at C:\node_modules\enhanced-resolve\lib\Resolver.js:435:5
at eval (eval at create (C:\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:16:1
)
at C:\node_modules\enhanced-resolve\lib\Resolver.js:435:5
at eval (eval at create (C:\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:27:1
)
at C:\node_modules\enhanced-resolve\lib\DescriptionFilePlugin.js:87:43
at C:\node_modules\enhanced-resolve\lib\Resolver.js:435:5
at eval (eval at create (C:\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:15:1
)
at C:\node_modules\enhanced-resolve\lib\Resolver.js:435:5
at processResult (C:\node_modules\webpack\lib\NormalModule.js:758:19)
at C:\node_modules\webpack\lib\NormalModule.js:860:5
at C:\node_modules\loader-runner\lib\LoaderRunner.js:400:11
at C:\node_modules\loader-runner\lib\LoaderRunner.js:252:18
at context.callback (C:\node_modules\loader-runner\lib\LoaderRunner.js:124:13)
at Object.loader (C:\node_modules\css-loader\dist\index.js:155:5)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
webpack compiled with 2 errors and 6 warnings
If you need any more information just send me a message.
Thanks in advance!

Error: Cannot find module code: 'MODULE_NOT_FOUND', (metaplex)

im heaving trouble uploading my NFT to the devnet in solana using metaplex cli
im following a tutorial on buildspace: https://buildspace.so/p/ship-solana-nft-collection/
(should be noted! im using WSL)
i followed as instructed and when i needed to upload my nfts throught metaplex i ran the command:
ts-node ~/metaplex/js/packages/cli/src/candy-machine-v2-cli.ts upload -e devnet -k ~/.config/solana/devnet.json -cp config.json ./assets
and then this eror pops up:
==========================================================================================
wallet public key: HAMgtaBZBZM8U1AJ5BGMDEcmoLqCzqL7mu9BU2kgrzCN
(node:12137) ExperimentalWarning: buffer.Blob is an experimental feature. This feature could change at any time
(Use node --trace-warnings ... to show where the warning was created)
(node:12137) UnhandledPromiseRejectionWarning: Error: Non-base58 character
at Object.decode (/home/deathsn1per/metaplex/js/node_modules/base-x/src/index.js:111:11)
at new PublicKey (/home/deathsn1per/metaplex/js/node_modules/#solana/web3.js/src/publickey.ts:56:30)
at getCandyMachineV2Config (/home/deathsn1per/metaplex/js/packages/cli/src/helpers/various.ts:164:9)
at Command. (/home/deathsn1per/metaplex/js/packages/cli/src/candy-machine-v2-cli.ts:157:38)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
(node:12137) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
(node:12137) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
=========================================================================================
i proceeded to inspect where the warning came from using:
node --trace-warnings ...
and it showed me this:
=======================================================================================
Error: Cannot find module '/home/deathsn1per/Projects/solanaXreact/nft-drop-starter-project/...'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
=========================================================================================
i thought maybe something wrong with the way installed metaplex, so i deleted every thing and re installed but nothing..
i installed metaplex files in home/deathsn1per/metaplex...
from what little i understand this is a problem with the modules, something went wrong with the installetion but i cant figure out what is it...
so im kinda lost as where to look even. or what to do to fix it, any help would be very nice!
i hope i provided with enough info (if needed more info pls dont kill just tell me what you need to know ;) )
The tutorial is way outdated. The tool that you are trying to use is deprecated and not supported anymore.
You should be using sugar instead which is a cli that is way faster and more reliable than the old js cli.
You can find a tutorial on the official docs here:
https://docs.metaplex.com/developer-tools/sugar/tutorials/my-first-candy-machine

Error when running `feathers generate authentication` for `RethinkDB`

I’m having issues when running feathers generate authentication with selecting rethinkdb as database.
Environment:
Mac OS X Sierra
feathers 2.2.3
npm 5.1.0
rethinkdb 2.3.5
Steps to reproduce:
I have up and running https://github.com/tenzan/feathers-chat.git
feathers generate authentication
Select Username + Password (Local)
What is the name of the user (entity) service? (users) <-- Enter
What kind of service is it? (Use arrow keys) ❯ RethinkDB <-- Enter
Output:
events.js:182
throw er; // Unhandled 'error' event
^
TypeError: Parameter "url" must be a string, not object
at Url.parse (url.js:102:11)
at Object.urlParse [as parse] (url.js:96:5)
at ConnectionGenerator._getConfiguration (/usr/local/lib/node_modules/feathers-cli/node_modules/generator-feathers/generators/connection/index.js:46:24)
at ConnectionGenerator._writeConfiguration (/usr/local/lib/node_modules/feathers-cli/node_modules/generator-feathers/generators/connection/index.js:103:32)
at ConnectionGenerator.writing (/usr/local/lib/node_modules/feathers-cli/node_modules/generator-feathers/generators/connection/index.js:297:10)
at Object.<anonymous> (/usr/local/lib/node_modules/feathers-cli/node_modules/yeoman-generator/lib/index.js:417:23)
at /usr/local/lib/node_modules/feathers-cli/node_modules/run-async/index.js:25:25
at Promise (<anonymous>)
at /usr/local/lib/node_modules/feathers-cli/node_modules/run-async/index.js:24:19
at /usr/local/lib/node_modules/feathers-cli/node_modules/yeoman-generator/lib/index.js:418:9
I had same errors on different Mac PCs with same environment.
It's an issue with generator-feathers
Remove the rethinkdb object from config/default
will see if I can fix the main problem
Edit: Fixed

Heroku build succeeds but deploy fails (no code change)

I'm getting the following error in LogDNA:
(node:28) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot find module '/tmp/build_[long-hash]/my-project-[long-hash]/node_modules/bluebird'
Process exited with status 0
State changed from starting to crashed
That line contains an import of Bluebird. When I remove the dependency and remove the line, then I get the same error, except it references the next line (which is also a dependency import).
When I deploy a branch that was previously working, I get the same error. Of course, I cannot re-pro this issue locally.
I compared the Dyno's npm list against my local, and they're the same. Also, all of the expected node_modules are, in fact, present in the Dyno's filesystem.
If I use Heroku-bash run the build task manually (with nothing special), then deploy, it's fine.
We had hard-coded/fixed the version of Electrode we're depending on, but Electrode has a fuzzy version for WebPack, which released a new version 5 days ago that caused this error. It causes the imports' paths to be incorrectly resolved/transpiled to the build directory instead of remain relative.
The workaround is to use require() instead of import.

Cannot run in production mode

I have a donejs application and its running ok in development mode donejs develop, but when I run it in production mode:
donejs build
donejs deploy (to firebase)
NODE_ENV=production donejs start
it will not start and show an error (see CODE A)
This file: file:my-app/dist/bundles/my-app/index.js:704 corresponds to JQuery 3.x and its not a dependency of the project itself but a dependency of can-connect-feathers (https://github.com/canjs/can-connect-feathers). In fact in index.js there is also included JQuery 2.x what makes me think there might be some sort of incompatibility among them.
I already tried changing the project's dependency to JQuery 3.x but didn't help. Actually it will make even donejs develop fail (see CODE B).
I also tried the following:
cd my-app/node_modules/steal
npm install
but didn't help, another error appears and finally tried cd my-app/node_modules/can && npm install but that end up in multiple errors.
I'm using:
donejs#0.9.2
node#4.6.2
npm#2.15.11
can-connect-feathers#1.2.1
CODE A
NODE_ENV=production donejs start
my-app#0.0.0 start my-app
done-serve --proxy http://localhost:3030 --port 8080
done-serve starting on http://localhost:8080
Potentially unhandled rejection [5] TypeError: Error loading "package.json!npm" at file:my-app/package.json
Error loading "bundles/my-app/index" at file:my-app/dist/bundles/my-app/index.js
Error evaluating file:my-app/dist/bundles/my-app/index.js
Cannot read property 'createElement' of undefined
at i (file:my-app/dist/bundles/my-app/index.js:704:20)
at file:my-app/dist/bundles/my-app/index.js:1039:2881
at file:my-app/dist/bundles/my-app/index.js:1039:3580
at file:my-app/dist/bundles/my-app/index.js:268:21
at file:my-app/dist/bundles/my-app/index.js:268:27
at Object.exports.runInThisContext (vm.js:54:17)
at doEval (my-app/node_modules/steal/node_modules/steal-systemjs/dist/system.src.js:2059:10)
at __eval (my-app/node_modules/steal/node_modules/steal-systemjs/dist/system.src.js:1976:7)
at Loader.exec [as __exec] (my-app/node_modules/steal/node_modules/steal-systemjs/dist/system.src.js:339:5)
at Loader.loader.instantiate (my-app/node_modules/steal/node_modules/steal-systemjs/dist/system.src.js:1517:16)
CODE B
donejs develop
my-app#0.0.0 develop my-app
done-serve --develop --proxy http://localhost:3030 --port 8080
done-serve starting on http://localhost:8080
Potentially unhandled rejection [8] Error: Error loading "my-app#0.0.0#index.stache!done-autorender#0.8.0#autorender" at <unknown>
Error loading "can#2.3.27#util/jquery/jquery" at file:my-app/node_modules/can/util/jquery/jquery.js
Error loading "can#2.3.27#util/jquery/jquery" from "done-autorender#0.8.0#autorender" at file:my-app/node_modules/done-autorender/src/autorender.js
Did not find ./node_modules/can/node_modules/jquery/package.json
at FetchTask.utils.extend.next (file:my-app/node_modules/steal/ext/npm-crawl.js:532:11)
at file:my-app/node_modules/steal/ext/npm-crawl.js:556:33
at tryCatchReject (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:1183:30)
at runContinuation1 (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:1142:4)
at Fulfilled.when (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:930:4)
at Pending.run (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:821:13)
at Scheduler._drain (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:97:19)
at Scheduler.drain (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:62:9)
at nextTickCallbackWith0Args (node.js:436:9)
at process._tickCallback (node.js:365:13)
Potentially unhandled rejection [16] Error: Error loading "can#2.3.27#util/jquery/jquery" at file:my-app/node_modules/can/util/jquery/jquery.js
Error loading "can#2.3.27#util/jquery/jquery" from "my-app#0.0.0#index.stache!done-autorender#0.8.0#autorender" at file:my-app/src/index.stache
Did not find ./node_modules/can/node_modules/jquery/package.json
at FetchTask.utils.extend.next (file:my-app/node_modules/steal/ext/npm-crawl.js:532:11)
at file:my-app/node_modules/steal/ext/npm-crawl.js:556:33
at tryCatchReject (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:1183:30)
at runContinuation1 (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:1142:4)
at Fulfilled.when (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:930:4)
at Pending.run (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:821:13)
at Scheduler._drain (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:97:19)
at Scheduler.drain (my-app/node_modules/steal/node_modules/steal-systemjs/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:62:9)
at nextTickCallbackWith0Args (node.js:436:9)
at process._tickCallback (node.js:365:13)
If the double jQuery installation is the issue, it should be resolved by version 2.0.0, which is exactly the same as the 1.0 version, but requires that you pass in a jQuery package as the jquery option. So, in addition to whatever else you had in your can-connect-feathers config, you'll need to provide the jquery option:
import $ from 'jquery'
import Feathers from 'can-connect-feathers';
new Feathers({
jquery: $
});

Resources