Giter Site home page Giter Site logo

frontendmasters / angular-components Goto Github PK

View Code? Open in Web Editor NEW
57.0 57.0 173.0 551 KB

[Course] Code for the AngularJS 1.x Components & ES6 Course

Home Page: https://frontendmasters.com/courses/angular-components-es6/

JavaScript 92.81% HTML 7.19%

angular-components's People

Contributors

1marc avatar dtauer avatar hendrixer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-components's Issues

Update the stylus dependency.

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.

bug:step-5: problem with json-server (potential fix)

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:

  • json-server's dependencies may be out of date, so you will need to find the global package on your computer. Mine was at: usr/local/lib/node_modules/json-server.
  • using your editor, go to json-server 's package.json file & remove all of the upticks ^ in front of all of the package's version numbers. Next ...
  • delete 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 =).

step-1 error on npm start

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.

bug (step-2)

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)

(bug) step-4 - Testing Components upgrade Karma packages

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

(bug) step-2-fix Can't find normalize.css

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

bundle.js.map is not generated in dist folder

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 :/

failed to locate @import file jeet.styl

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.

bug-step-01 Failed at the [email protected] start script 'gulp'

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 ]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.