Coder Social home page Coder Social logo

angular2-simple-build's Introduction

How to use?

Updated to final!

npm i
npm run build_prod
npm run serve

For further information take a look at this blog post.

License

MIT

angular2-simple-build's People

Contributors

alanwuji avatar dorako321 avatar mgechev 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

Watchers

 avatar  avatar  avatar  avatar  avatar

angular2-simple-build's Issues

Build Fails for Unknown Reason

Hello, thanks for your article on bundling Angular2 apps. I first tried to bundle my app. Later I clone this repo and tried it again to see if it works but it's giving me exact same error. Please see npm log below.

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build_prod' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild_prod', 'build_prod', 'postbuild_prod' ]
5 info lifecycle [email protected]prebuild_prod: [email protected]
6 silly lifecycle [email protected]
prebuild_prod: no script for prebuild_prod, continuing
7 info lifecycle [email protected]build_prod: [email protected]
8 verbose lifecycle [email protected]
build_prod: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]build_prod: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/achintverma/pj/angular2-simple-build/node_modules/.bin:/usr/local/bin:/Users/achintverma/gapp/google-cloud-sdk/bin:/Users/achintverma/bin/:/usr/local/bin:/Applications/MAMP/bin/php/php5.6.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/.composer/vendor/bin:/opt/X11/bin:/usr/local/MacGPG2/bin:/usr/local/ec2/ec2-api-tools-1.7.5.1/bin
10 verbose lifecycle [email protected]build_prod: CWD: /Users/achintverma/pj/angular2-simple-build
11 silly lifecycle [email protected]
build_prod: Args: [ '-c',
11 silly lifecycle 'npm run build && browserify -s main dist/main.js > dist/bundle.js && npm run minify' ]
12 silly lifecycle [email protected]build_prod: Returned: code: 1 signal: null
13 info lifecycle [email protected]
build_prod: Failed to exec build_prod script
14 verbose stack Error: [email protected] build_prod: npm run build && browserify -s main dist/main.js > dist/bundle.js && npm run minify
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:242:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:852:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
15 verbose pkgid [email protected]
16 verbose cwd /Users/achintverma/pj/angular2-simple-build
17 error Darwin 15.6.0
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build_prod"
19 error node v6.4.0
20 error npm v3.10.3
21 error code ELIFECYCLE
22 error [email protected] build_prod: npm run build && browserify -s main dist/main.js > dist/bundle.js && npm run minify
22 error Exit status 1
23 error Failed at the [email protected] build_prod script 'npm run build && browserify -s main dist/main.js > dist/bundle.js && npm run minify'.
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 angular2-min package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error npm run build && browserify -s main dist/main.js > dist/bundle.js && npm run minify
23 error You can get information on how to open an issue for this project with:
23 error npm bugs angular2-min
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls angular2-min
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

help

Not sure if i have done something wrong, but i'm trying to get a basic version of angular bundling working.

I download this source code, npm i, runs succesfully but when i run npm run build_prod it fails. It failed on almost every step so i deleted all items but this line, just to get an idea on how this works.

"build_prod": "npm run browserify -s main dist/main.js > dist/bundle.js"

That also fails with this error, any help would be great?

16 verbose cwd C:\Users\kevin\Downloads\angular2-simple-build-master\angular2-simple-build-master
17 error Windows_NT 10.0.10586
18 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "build_prod"
19 error node v6.9.5
20 error npm v3.10.10
21 error code ELIFECYCLE
22 error [email protected] build_prod: npm run browserify -s main dist/main.js > dist/bundle.js
22 error Exit status 1
23 error Failed at the [email protected] build_prod script 'npm run browserify -s main dist/main.js > dist/bundle.js'.
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 angular2-min package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error npm run browserify -s main dist/main.js > dist/bundle.js
23 error You can get information on how to open an issue for this project with:
23 error npm bugs angular2-min
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls angular2-min
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

npm run build_prod failed

Hi, first of all thanks for put these instructions up. but unfortunately I got an error when running the prod_build.
(I am using windows so I changed the clean task to "del /Q dist", which worked out ok)

Following is what reported in npm-debug.log (sorry I don't know how to make following issue reported look prettier):

0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files\nodejs\node.exe', 1 verbose cli 'C:\Users\u0479064\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'build_prod' ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'prebuild_prod', 'build_prod', 'postbuild_prod' ] 5 info lifecycle [email protected]~prebuild_prod: [email protected] 6 silly lifecycle [email protected]~prebuild_prod: no script for prebuild_prod, continuing 7 info lifecycle [email protected]~build_prod: [email protected] 8 verbose lifecycle [email protected]~build_prod: unsafe-perm in lifecycle true 9 verbose lifecycle [email protected]~build_prod: PATH: C:\Users\u0479064\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\Projects Angular 2\angular2-simple-build\node_modules.bin;C:/Program Files/Java/jre1.8.0_101/bin/server;C:/Program Files/Java/jre1.8.0_101/bin;C:/Program Files/Java/jre1.8.0_101/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\CCM;C:\Windows\CCM;C:\Windows\CCM;C:\Windows\CCM;C:\Windows\CCM;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\nodejs\;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\CCM;C:\Windows\CCM;C:\Windows\CCM;C:\Windows\CCM;C:\Windows\CCM;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Users\u0479064\AppData\Roaming\npm;C:\Windows\system32; 10 verbose lifecycle [email protected]~build_prod: CWD: C:\Projects Angular 2\angular2-simple-build 11 silly lifecycle [email protected]~build_prod: Args: [ '/d /s /c', 11 silly lifecycle 'npm run build && browserify -s main dist/main.js > dist/bundle.js && npm run minify' ] 12 silly lifecycle [email protected]~build_prod: Returned: code: 1 signal: null 13 info lifecycle [email protected]~build_prod: Failed to exec build_prod script 14 verbose stack Error: [email protected] build_prod: `npm run build && browserify -s main dist/main.js > dist/bundle.js && npm run minify` 14 verbose stack Exit status 1 14 verbose stack at EventEmitter. (C:\Users\u0479064\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:255:16) 14 verbose stack at emitTwo (events.js:87:13) 14 verbose stack at EventEmitter.emit (events.js:172:7) 14 verbose stack at ChildProcess. (C:\Users\u0479064\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14) 14 verbose stack at emitTwo (events.js:87:13) 14 verbose stack at ChildProcess.emit (events.js:172:7) 14 verbose stack at maybeClose (internal/child_process.js:829:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 15 verbose pkgid [email protected] 16 verbose cwd C:\Projects Angular 2\angular2-simple-build 17 error Windows_NT 6.1.7601 18 error argv "C:\Program Files\nodejs\node.exe" "C:\Users\u0479064\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "build_prod" 19 error node v4.5.0 20 error npm v3.10.8 21 error code ELIFECYCLE 22 error [email protected] build_prod: `npm run build && browserify -s main dist/main.js > dist/bundle.js && npm run minify` 22 error Exit status 1 23 error Failed at the [email protected] build_prod script 'npm run build && browserify -s main dist/main.js > dist/bundle.js && npm run minify'. 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 angular2-min package, 23 error not with npm itself. 23 error Tell the author that this fails on your system: 23 error npm run build && browserify -s main dist/main.js > dist/bundle.js && npm run minify 23 error You can get information on how to open an issue for this project with: 23 error npm bugs angular2-min 23 error Or if that isn't available, you can get their info via: 23 error npm owner ls angular2-min 23 error There is likely additional logging output above. 24 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.