frontendmasters / angular-components Goto Github PK
View Code? Open in Web Editor NEW[Course] Code for the AngularJS 1.x Components & ES6 Course
Home Page: https://frontendmasters.com/courses/angular-components-es6/
[Course] Code for the AngularJS 1.x Components & ES6 Course
Home Page: https://frontendmasters.com/courses/angular-components-es6/
Running on Windows 10 Pro/NT
Kept getting this error right before build:
Potentially unhandled rejection [4] Error: callback(): The callback was already called. at context.callback (C:\Users\Business\Learning\angularjs1x-components\node_modules\webpack-core\lib\NormalModuleMixin.js:143:11) at tryCatchReject (C:\Users\Business\Learning\angularjs1x-components\node_modules\when\lib\makePromise.js:840:30) at runContinuation1 (C:\Users\Business\Learning\angularjs1x-components\node_modules\when\lib\makePromise.js:799:4) at Rejected.when (C:\Users\Business\Learning\angularjs1x-components\node_modules\when\lib\makePromise.js:623:4) at Pending.run (C:\Users\Business\Learning\angularjs1x-components\node_modules\when\lib\makePromise.js:481:13) at Scheduler._drain (C:\Users\Business\Learning\angularjs1x-components\node_modules\when\lib\Scheduler.js:62:19) at Scheduler.drain (C:\Users\Business\Learning\angularjs1x-components\node_modules\when\lib\Scheduler.js:27:9) at _combinedTickCallback (internal/process/next_tick.js:67:7) at process._tickCallback (internal/process/next_tick.js:98:9)
I was also getting the Jeet issue that has already been addressed here. On Windows I had to manually update the Stylus dependency to the latest release to get build to load and watch to start.
If you get the message below from JSON-server see: TypeError: low(...).state is not a function.
\{^_^}/ hi!
Loading db.json
/usr/local/lib/node_modules/json-server/src/cli/utils/load.js:31
data = low(source, { storage: fileAsync }).state()
^
TypeError: low(...).state is not a function
at module.exports (/usr/local/lib/node_modules/json-server/src/cli/utils/load.js:31:48)
at start (/usr/local/lib/node_modules/json-server/src/cli/run.js:99:5)
at module.exports (/usr/local/lib/node_modules/json-server/src/cli/run.js:126:3)
at module.exports (/usr/local/lib/node_modules/json-server/src/cli/index.js:86:3)
at Object.<anonymous> (/usr/local/lib/node_modules/json-server/bin/index.js:2:22)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.Module.runMain (module.js:447:10)
TDLR:
usr/local/lib/node_modules/json-server
.json-server
's package.json file & remove all of the upticks ^
in front of all of the package's version numbers. Next ...node_modules
then run npm install
I misunderstood & removed the ^ from the project I was using instead of the actual json-server package located on my computer at usr/local/lib/node_modules/json-server/. Once I removed the ^ from the package.json inside of the json-server package (usr/local/lib/node_modules/json-server/), deleted the node_modules folder & did npm install my json-server package began to work again =).
carolyn angular-components % npm start .. AssertionError [ERR_ASSERTION]: Task function must be specified at Gulp.set [as _setTask] (/Users/carolynlynch/Documents/git/angular-components/node_modules/undertaker/lib/set-task.js:10:3) at Gulp.task (/Users/carolynlynch/Documents/git/angular-components/node_modules/undertaker/lib/task.js:13:8) at Object.<anonymous> (/Users/carolynlynch/Documents/git/angular-components/gulpfile.js:25:6) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:94:18) at requireOrImport (/Users/carolynlynch/Documents/git/angular-components/node_modules/gulp-cli/lib/shared/require-or-import.js:19:11) { generatedMessage: false, code: 'ERR_ASSERTION', actual: false, expected: true, operator: '==' }
Getting the above error when running npm start on fresh pulled code. Using step-1 branch.
Trying to npm start (after npm installing) the step-2-fix branch after importing angular-ui-router. Same error appears when trying to npm start step-3-fix as well.
[17:19:34] Using gulpfile ~/Documents/AngularJS/angular-components/gulpfile.js [17:19:34] Starting 'default'... [17:19:34] Starting 'todo'... [17:19:34] Totals [17:19:34] Finished 'todo' after 29 ms [17:19:34] Starting 'build'... Potentially unhandled rejection [4] Error: callback(): The callback was already called. at context.callback (/Users/naotoy/Documents/AngularJS/angular-components/node_modules/webpack-core/lib/NormalModuleMixin.js:143:11) at tryCatchReject (/Users/naotoy/Documents/AngularJS/angular-components/node_modules/when/lib/makePromise.js:840:30) at runContinuation1 (/Users/naotoy/Documents/AngularJS/angular-components/node_modules/when/lib/makePromise.js:799:4) at Rejected.when (/Users/naotoy/Documents/AngularJS/angular-components/node_modules/when/lib/makePromise.js:623:4) at Pending.run (/Users/naotoy/Documents/AngularJS/angular-components/node_modules/when/lib/makePromise.js:481:13) at Scheduler._drain (/Users/naotoy/Documents/AngularJS/angular-components/node_modules/when/lib/Scheduler.js:62:19) at Scheduler.drain (/Users/naotoy/Documents/AngularJS/angular-components/node_modules/when/lib/Scheduler.js:27:9) at _combinedTickCallback (internal/process/next_tick.js:73:7) at process._tickCallback (internal/process/next_tick.js:104:9)
Before writing your tests for step 4, Scott notes we need to update our karma.conf.js
file. Afterwards, when running npm start
you might get an error saying "cannot load webpack".
My Fix: I removed all the karma packages from my devDependencies
in my package.json
file & node_modules
folder:
npm uninstall --save-dev karma karma-chai karma-chrome-launcher karma-mocha karma-mocha-reporter karma-sourcemap-loader karma-webpack
Next just install the new packages
npm install --save-dev karma karma-chai karma-chrome-launcher karma-mocha karma-mocha-reporter karma-sourcemap-loader karma-webpack
When I run gulp build
I get an error:
stream.js:74
throw er; // Unhandled stream error in pipe.
^
Error: ModuleNotFoundError: Module not found: Error: Cannot resolve module 'normalize.css' in /Users/racheltstevens/Jambon/angular-components/client/app
I'm trying to figure out why bundle.js.map is not generated in dist folder. I'm on the step-8-fix branch. When I do npm start, I see in the output that bundle.js.map was emitted by webpack. However this file is not generated in dist folder. So I have no access to source maps code :/
Not sure Why this is happening. This happens in steps 2 and after.
I get an error after running npm start...
0 info it worked if it ends with ok 1 verbose cli [ '/Users/jgaba/.nvm/versions/node/v5.6.0/bin/node', 1 verbose cli '/Users/jgaba/.nvm/versions/node/v5.6.0/bin/npm', 1 verbose cli 'start' ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle [email protected]~prestart: [email protected] 6 silly lifecycle [email protected]~prestart: no script for prestart, continuing 7 info lifecycle [email protected]~start: [email protected] 8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true 9 verbose lifecycle [email protected]~start: PATH: /Users/jgaba/.nvm/versions/node/v5.6.0/lib/node_modules/npm/bin/node-gyp-bin:/Users/jgaba/development/angular-components/node_modules/.bin:/Users/jgaba/.nvm/versions/node/v5.6.0/bin:/usr/local/opt/php70/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin 10 verbose lifecycle [email protected]~start: CWD: /Users/jgaba/development/angular-components 11 silly lifecycle [email protected]~start: Args: [ '-c', 'gulp' ] 12 silly lifecycle [email protected]~start: Returned: code: 1 signal: null 13 info lifecycle [email protected]~start: Failed to exec start script 14 verbose stack Error: [email protected] start:
gulp 14 verbose stack Exit status 1 14 verbose stack at EventEmitter.<anonymous> (/Users/jgaba/.nvm/versions/node/v5.6.0/lib/node_modules/npm/lib/utils/lifecycle.js:232:16) 14 verbose stack at emitTwo (events.js:100:13) 14 verbose stack at EventEmitter.emit (events.js:185:7) 14 verbose stack at ChildProcess.<anonymous> (/Users/jgaba/.nvm/versions/node/v5.6.0/lib/node_modules/npm/lib/utils/spawn.js:24:14) 14 verbose stack at emitTwo (events.js:100:13) 14 verbose stack at ChildProcess.emit (events.js:185:7) 14 verbose stack at maybeClose (internal/child_process.js:827:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 15 verbose pkgid [email protected] 16 verbose cwd /Users/jgaba/development/angular-components 17 error Darwin 15.5.0 18 error argv "/Users/jgaba/.nvm/versions/node/v5.6.0/bin/node" "/Users/jgaba/.nvm/versions/node/v5.6.0/bin/npm" "start" 19 error node v5.6.0 20 error npm v3.6.0 21 error code ELIFECYCLE 22 error [email protected] start:
gulp`
22 error Exit status 1
23 error Failed at the [email protected] start script 'gulp'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the ng-blog package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error gulp
23 error You can get information on how to open an issue for this project with:
23 error npm bugs ng-blog
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls ng-blog
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
`
Node version: v5.6.0
NPM Version: 3.6.0
Let me know if I haven't provided enough information.
(step-5-fix)
Jeet 6.1.4 is current and is breaking everything, set version to 6.1.2
for step-01, while doing npm start, i am getting following error.
12 error Windows_NT 10.0.10586
13 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
14 error node v4.4.0
15 error npm v2.14.20
16 error code ELIFECYCLE
17 error [email protected] start: gulp
17 error Exit status 1
18 error Failed at the [email protected] start script 'gulp'.
18 error This is most likely a problem with the ng-blog package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error gulp
18 error You can get information on how to open an issue for this project with:
18 error npm bugs ng-blog
18 error Or if that isn't available, you can get their info via:
18 error
18 error npm owner ls ng-blog
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.