I have downloaded the angular quick start code and set it up in my machine but when i run the command npm start it gives me the following errors:
Uncaught Error: Zone already loaded.
at zone.js:32
at zone.js:643
at FUNCTION (zone.js:11)
at zone.js:12
Unhandled promise rejection TypeError: Zone.assertZonePatched is not a function
at new NgZone (core.umd.js:3807)
at PlatformRef_._bootstrapModuleFactoryWithZone (core.umd.js:4524)
at eval (core.umd.js:4569)
at shim.min.js:8
at shim.min.js:8
at MutationObserver.s (shim.min.js:7)
at Zone.run (angular2-polyfills.js:138)
at MutationObserver.zoneBoundFn (angular2-polyfills.js:111)
I am using node version 6.11.3 and npm version as 3.10.10. So can anybody help me on this?
Related
I'm new to nextJS and typescript. I'm trying to create simple blog with nextJS/typescript and sanity CMS backend. When I run dev, it successfully compiles but then I get the following Unhandled Runtime Error Error.
OS: MacOS monterey(M1)
Node: v18.12.1
NextJS: 12.3
typescript: 4.8
Unhandled Runtime Error
Error: [object ProgressEvent]
Call Stack
Object.getProperError
node_modules/next/dist/lib/is-error.js (25:0)
Object.eval
node_modules/next/dist/client/index.js (574:39)
step
node_modules/tslib/tslib.es6.js (102:0)
Object.eval [as next]
node_modules/tslib/tslib.es6.js (83:45)
asyncGeneratorStep
node_modules/#swc/helpers/lib/_async_to_generator.js (23:0)
_next
node_modules/#swc/helpers/lib/_async_to_generator.js (12:0)
I've tried deleting/re-installing node_modules and package.json and that didn't work. Not sure if it's a dependency problem. Could it be that the _async_to_generator.js file is not handling an async function/promise? Do I need to change SWC back to babel complier. Any ideas? anyone had this issue?
While setting up my dev environment for react, I've become unable to get a server to run. I've done fresh re-installs of npm, node, create-react-app, and I get thrown the same error everytime I run npm start.
/Users/sophiamatthews/Desktop/Coding?/7-react-tutorial/node_modules/react-scripts/scripts/start.js:19
throw err;
^
Error: Compiling RuleSet failed: Query arguments on 'loader' has been removed in favor of the 'options' property (at ruleSet[1].rules[0].loader: /Users/sophiamatthews/Desktop/Coding?/7-react-tutorial/node_modules/source-map-loader/dist/cjs.js)
at RuleSetCompiler.error (/Users/sophiamatthews/Desktop/Coding?/7-react-tutorial/node_modules/webpack/lib/rules/RuleSetCompiler.js:373:10)
at /Users/sophiamatthews/Desktop/Coding?/7-react-tutorial/node_modules/webpack/lib/rules/UseEffectRulePlugin.js:160:29
at Hook.eval [as call] (eval at create (/Users/sophiamatthews/Desktop/Coding?/7-react-tutorial/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:49:1)
at RuleSetCompiler.compileRule (/Users/sophiamatthews/Desktop/Coding?/7-react-tutorial/node_modules/webpack/lib/rules/RuleSetCompiler.js:177:19)
at /Users/sophiamatthews/Desktop/Coding?/7-react-tutorial/node_modules/webpack/lib/rules/RuleSetCompiler.js:154:9
at Array.map (<anonymous>)
at RuleSetCompiler.compileRules (/Users/sophiamatthews/Desktop/Coding?/7-react-tutorial/node_modules/webpack/lib/rules/RuleSetCompiler.js:153:16)
at RuleSetCompiler.compileRule (/Users/sophiamatthews/Desktop/Coding?/7-react-tutorial/node_modules/webpack/lib/rules/RuleSetCompiler.js:184:30)
at /Users/sophiamatthews/Desktop/Coding?/7-react-tutorial/node_modules/webpack/lib/rules/RuleSetCompiler.js:154:9
at Array.map (<anonymous>)
This is being done on a new machine that hasn't had any developer tools installed previously.
Not a Duplicate of Error: Compiling RuleSet failed: Query arguments on 'loader' has been removed in favor of the 'options' property
My error occurs in a different file that has a different structure.
7-react-tutorial/node_modules/source-map-loader/dist/cjs.js looks as such
"use strict";
const loader = require("./index");
module.exports = loader.default;
module.exports.raw = loader.raw;
I have an Angular 11.x app that I run using npm run start - this has worked fine for months but all of a sudden it is no longer running the command and I am getting the following errors, can anyone suggest how I fix this? I have tried the obvious ideas of deleting node_modules and reinstalling them using npm install but with no joy.
Below is the error I get after running npm run start - what have I done to break this :(
Compiling #angular/core : es2015 as esm2015
Error: Error on worker #1: TypeError: Cannot read property 'map' of undefined
at injectDependencies (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler/bundles/compiler.umd.js:6960:21)
at compileFactoryFunction (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler/bundles/compiler.umd.js:6888:61)
at Object.compileInjector (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler/bundles/compiler.umd.js:8106:22)
at NgModuleDecoratorHandler.compileFull (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler-cli/src/ngtsc/annotations/src/ng_module.js:427:44)
at _loop_2 (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler-cli/src/ngtsc/transform/src/compilation.js:595:39)
at NgccTraitCompiler.TraitCompiler.compile (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler-cli/src/ngtsc/transform/src/compilation.js:626:21)
at DecorationAnalyzer.compileFile (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler-cli/ngcc/src/analysis/decoration_analyzer.js:225:53)
at DecorationAnalyzer.analyzeProgram (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler-cli/ngcc/src/analysis/decoration_analyzer.js:164:45)
at Transformer.analyzeProgram (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler-cli/ngcc/src/packages/transformer.js:135:57)
at Transformer.transform (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler-cli/ngcc/src/packages/transformer.js:77:27)
at ClusterMaster.onWorkerMessage (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler-cli/ngcc/src/execution/cluster/master.js:195:27)
at /Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler-cli/ngcc/src/execution/cluster/master.js:55:95
at ClusterMaster.<anonymous> (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler-cli/ngcc/src/execution/cluster/master.js:293:57)
at step (/Users/zabius/Sites/abc-ui-ng4/node_modules/tslib/tslib.js:143:27)
at Object.next (/Users/zabius/Sites/abc-ui-ng4/node_modules/tslib/tslib.js:124:57)
at /Users/zabius/Sites/abc-ui-ng4/node_modules/tslib/tslib.js:117:75
at new Promise (<anonymous>)
at Object.__awaiter (/Users/zabius/Sites/abc-ui-ng4/node_modules/tslib/tslib.js:113:16)
at EventEmitter.<anonymous> (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler-cli/ngcc/src/execution/cluster/master.js:287:32)
at EventEmitter.emit (events.js:315:20)
An unhandled exception occurred: NGCC failed.
See "/private/var/folders/b2/1zfdxz293d944p_lxk9_ypz40000gn/T/ng-XQcM3b/angular-errors.log" for further details.
The error in the angular-errors.log file is as follows -
[error] Error: NGCC failed.
at NgccProcessor.process (/Users/zabius/Sites/abc-ui-ng4/node_modules/#ngtools/webpack/src/ngcc_processor.js:129:19)
at /Users/zabius/Sites/abc-ui-ng4/node_modules/#ngtools/webpack/src/angular_compiler_plugin.js:593:31
at SyncHook.eval [as call] (eval at create (/Users/zabius/Sites/abc-ui-ng4/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10$
at SyncHook.lazyCompileHook (/Users/zabius/Sites/abc-ui-ng4/node_modules/webpack/node_modules/tapable/lib/Hook.js:154:20)
at Object.webpack [as webpackFactory] (/Users/zabius/Sites/abc-ui-ng4/node_modules/webpack/lib/webpack.js:55:30)
at createWebpack (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular-devkit/build-webpack/src/webpack-dev-server/index.js:21:36)
at Object.runWebpackDevServer (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular-devkit/build-webpack/src/webpack-dev-server/index.js:47:12)
at SwitchMapSubscriber.project (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular-devkit/build-angular/src/dev-server/index.js:209:32)
at SwitchMapSubscriber._next (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular-devkit/build-angular/node_modules/rxjs/internal/operators/swit$
at SwitchMapSubscriber.Subscriber.next (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular-devkit/build-angular/node_modules/rxjs/internal/Subs$
at /Users/zabius/Sites/abc-ui-ng4/node_modules/#angular-devkit/build-angular/node_modules/rxjs/internal/util/subscribeToPromise.js:7:24
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Versions :
npm -v 8.1.0
node -v 14.15.4
Using MacOS BigSur 11.5.2
I tried running the latest version of node and postgresql, but was having problem i deprecated node to 13.12.0 and sails-postgresql to 1.0.2 as mentioned in one of the blog. still the error is coming. Stack trace is as below:
sails lift
info: Starting app...
(node:10460) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
info: Initializing apianalytics hook... (requests to monitored routes will be logged!)
info: ·• Auto-migrating... (alter)
info: Hold tight, this could take a moment.
error:
error: Error: Sails is taking too long to load.
Troubleshooting tips:
-• Were you still reading/responding to an interactive prompt?
(Whoops, sorry! Please lift again and try to respond a bit more quickly.)
-• Do you have a lot of stuff in assets/? Grunt might still be running.
(Try increasing the hook timeout. Currently it is 40000.
e.g. sails lift --hookTimeout=80000)
-• Is blueprints a custom or 3rd party hook?
(If initialize() is using a callback, make sure it's being called.)
at Timeout.tooLong [as _onTimeout] (C:\Users\dearm\OneDrive\Desktop\my work\sails-logrocket\myapp\node_modules\sails\lib\app\private\loadHooks.js:191:21)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
error: Could not load Sails app.
error:
error: Tips:
error: • First, take a look at the error message above.
error: • Make sure you've installed dependencies with npm install.
error: • Check that this app was built for a compatible version of Sails.
error: • Have a question or need help? (http://sailsjs.com/support)
complete code is here https://github.com/mannawar/sails_app
Try using Node version 10 and sails-postgresql version 2.0.0
I'm trying to install Angular 2 on standalone computer.
I tried to install the framework on a computer that connected to the network with the following steps:
1) download the quick start from github.
2) cd to the quickstart-master directory.
3) use npm install.
4) use npm start.
the "Hello Angular" application is running successfully.
After I copied the quickstart folder to the standalone computer (which has node installed) I did the following steps:
1) cd to the quickstart directory.
2) used npm start.
This time when the chrome browser is opened I get "Loading AppComponent content here..." and NOT "Hello Angular".
How can I use Angular 2 on the standalone computer?
thanks a lot!
Edit:
The stack trace:
SyntaxError "Error: (SystemJS) Unexpected identifier SyntaxError:
Unexpected identifier at eval (native) at ZoneDelegate.invoke
(http://localhost:3000/node_modules/zone.js/dist/zone.js:365:26) at
Zone.run(http://localhost:3000/node_modules/zone.js/dist/zone.js:125:43)
at http://localhost:3000/node_modules/zone.js/dist/zone.js:760:57 at
ZoneDelegate.invokeTask
(http://localhost:3000/node_modules/zone.js/dist/zone.js:398:31)
Evaluating http://localhost:3000/systemjs-angular-loader.js Error
loading http://localhost:3000/systemjs-angular-loader.js Error loading
http://localhost:3000/app/app.module.js as "./app/app.module" from
http://localhost:3000/main.js at new Error () at
Error.ZoneAwareError
(http://localhost:3000/node_modules/zone.js/dist/zone.js:917:33) at
addToError
(http://localhost:3000/node_modules/systemjs/dist/system.src.js:122:82)
at linkSetFailed
(http://localhost:3000/node_modules/systemjs/dist/system.src.js:695:21)
at
http://localhost:3000/node_modules/systemjs/dist/system.src.js:495:9
at ZoneDelegate.invoke
(http://localhost:3000/node_modules/zone.js/dist/zone.js:365:26) at
Zone.run
(http://localhost:3000/node_modules/zone.js/dist/zone.js:125:43) at
http://localhost:3000/node_modules/zone.js/dist/zone.js:760:57 at
ZoneDelegate.invokeTask
(http://localhost:3000/node_modules/zone.js/dist/zone.js:398:31) at
Zone.runTask
(http://localhost:3000/node_modules/zone.js/dist/zone.js:165:47) at
drainMicroTaskQueue
(http://localhost:3000/node_modules/zone.js/dist/zone.js:593:35) at g
(http://localhost:3000/node_modules/core-js/client/shim.min.js:8:10016)
at
http://localhost:3000/node_modules/core-js/client/shim.min.js:8:10138
at MutationObserver.h
(http://localhost:3000/node_modules/core-js/client/shim.min.js:8:14293)"