René's URL Explorer Experiment


Title: Including a 3rd party lib · Issue #999 · angular/angular-cli · GitHub

Open Graph Title: Including a 3rd party lib · Issue #999 · angular/angular-cli

X Title: Including a 3rd party lib · Issue #999 · angular/angular-cli

Description: I have looked at a number of different issues (#274, #785, #845) and the wiki page (https://github.com/angular/angular-cli/wiki/3rd-party-libs) and I still cannot get a simple JS file to work in my project. I'm trying to use filesaver.js...

Open Graph Description: I have looked at a number of different issues (#274, #785, #845) and the wiki page (https://github.com/angular/angular-cli/wiki/3rd-party-libs) and I still cannot get a simple JS file to work in my...

X Description: I have looked at a number of different issues (#274, #785, #845) and the wiki page (https://github.com/angular/angular-cli/wiki/3rd-party-libs) and I still cannot get a simple JS file to work in my...

Mail addresses
notifications@github.com
notifications@github.com

Opengraph URL: https://github.com/angular/angular-cli/issues/999

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Including a 3rd party lib","articleBody":"I have looked at a number of different issues (https://github.com/angular/angular-cli/issues/274, https://github.com/angular/angular-cli/issues/785, https://github.com/angular/angular-cli/issues/845) and the wiki page (https://github.com/angular/angular-cli/wiki/3rd-party-libs) and I still cannot get a simple JS file to work in my project.\n\nI'm trying to use [filesaver.js](https://www.npmjs.com/package/filesaver.js) in my app. My \n\nangular-cli-build.js\n\n```\n/* global require, module */\n\nvar Angular2App = require('angular-cli/lib/broccoli/angular2-app');\n\nmodule.exports = function(defaults) {\n  return new Angular2App(defaults, {\n    vendorNpmFiles: [\n      'systemjs/dist/system-polyfills.js',\n      'systemjs/dist/system.src.js',\n      'zone.js/dist/*.js',\n      'es6-shim/es6-shim.js',\n      'reflect-metadata/*.js',\n      'rxjs/**/*.js',\n      '@angular/**/*.js',\n      'filesaver.js/FileSaver.js'\n    ]\n  });\n};\n```\n\nmy system-config.ts\n\n```\n/***********************************************************************************************\n * User Configuration.\n **********************************************************************************************/\n/** Map relative paths to URLs. */\nconst map: any = {\n  'filesaverjs': 'vendor/filesaver.js',\n};\n\n/** User packages configuration. */\nconst packages: any = {\n  'filesaverjs': {defaultExtension: 'js', main: 'FileSaver'},\n};\n```\n\nI installed the package with npm:\n\n```\njeff@computer:~/dev/myProj$ ls  ./node_modules/filesaver.js/\ndemo  FileSaver.js  FileSaver.min.js  LICENSE.md  package.json  README.md\n```\n\nIt shows up in my vendor folder:\n\n```\njeff@BenSolo:~/dev/ang_proj/analystToolbox$ ls  ./dist/vendor/filesaver.js/\nFileSaver.js  FileSaver.min.js\n```\n\nI try to use it in my component, and it `Cannot find module filesaverjs`:\n\n```\n// in file ./src/app/+my-component.component.ts\nimport { Component, OnInit } from '@angular/core';\nimport { FORM_DIRECTIVES } from '@angular/common';\nimport { PlatformDescriptionService } from '../platform-description.service';\nimport * as saver from 'filesaverjs'; // ERROR: Cannot find module 'filesaverjs'.\n```\n\n**What am I missing?**\n## Useful info:\n### OS?\n\nLinux Ubuntu \n### Versions.\n\n```\n$ ng --version\nCould not start watchman; falling back to NodeWatcher for file system events.\nVisit http://ember-cli.com/user-guide/#watchman for more info.\nangular-cli: 1.0.0-beta.5\nnode: 5.10.1\nos: linux x64\n```\n### Repro steps.\n1. run this:\n   \n    ng testProj\n    cd ./testProj\n    npm install filesaver.js --save\n2. make the changes outlined above to `system-config.js` and `angular-cli-build.js`\n3. run `ng build`\n4. edit `./src/app/test-proj.component.ts`:\n   \n   //add this line:\n   'filesaverjs': {defaultExtension: 'js', main: 'FileSaver'},\n5. `ng build` or `ng build`:\n\n```\njeff@BenSolo:~/dev/ang_proj/testProj$ ng serve\nCould not start watchman; falling back to NodeWatcher for file system events.\nVisit http://ember-cli.com/user-guide/#watchman for more info.\nLivereload server on http://localhost:49152\nServing on http://localhost:4200/\nThe Broccoli Plugin: [BroccoliTypeScriptCompiler] failed with:\nError: Typescript found the following errors:\n  /home/jeff/dev/ang_proj/testProj/tmp/broccoli_type_script_compiler-input_base_path-gJxDieIo.tmp/0/src/app/test-proj.component.ts (2, 28): Cannot find module 'filesaverjs'.\n    at BroccoliTypeScriptCompiler._doIncrementalBuild (/home/jeff/dev/ang_proj/testProj/node_modules/angular-cli/lib/broccoli/broccoli-typescript.js:115:19)\n    at BroccoliTypeScriptCompiler.build (/home/jeff/dev/ang_proj/testProj/node_modules/angular-cli/lib/broccoli/broccoli-typescript.js:43:10)\n    at /home/jeff/dev/ang_proj/testProj/node_modules/angular-cli/node_modules/broccoli-caching-writer/index.js:152:21\n    at lib$rsvp$$internal$$tryCatch (/home/jeff/dev/ang_proj/testProj/node_modules/angular-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:1036:16)\n    at lib$rsvp$$internal$$invokeCallback (/home/jeff/dev/ang_proj/testProj/node_modules/angular-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:1048:17)\n    at lib$rsvp$$internal$$publish (/home/jeff/dev/ang_proj/testProj/node_modules/angular-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:1019:11)\n    at lib$rsvp$asap$$flush (/home/jeff/dev/ang_proj/testProj/node_modules/angular-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:1198:9)\n    at _combinedTickCallback (internal/process/next_tick.js:67:7)\n    at process._tickCallback (internal/process/next_tick.js:98:9)\n\nThe broccoli plugin was instantiated at: \n    at BroccoliTypeScriptCompiler.Plugin (/home/jeff/dev/ang_proj/testProj/node_modules/angular-cli/node_modules/broccoli-caching-writer/node_modules/broccoli-plugin/index.js:10:31)\n    at BroccoliTypeScriptCompiler.CachingWriter [as constructor] (/home/jeff/dev/ang_proj/testProj/node_modules/angular-cli/node_modules/broccoli-caching-writer/index.js:21:10)\n    at BroccoliTypeScriptCompiler (/home/jeff/dev/ang_proj/testProj/node_modules/angular-cli/lib/broccoli/broccoli-typescript.js:26:49)\n    at Angular2App._getTsTree (/home/jeff/dev/ang_proj/testProj/node_modules/angular-cli/lib/broccoli/angular2-app.js:321:18)\n    at Angular2App._buildTree (/home/jeff/dev/ang_proj/testProj/node_modules/angular-cli/lib/broccoli/angular2-app.js:116:23)\n    at new Angular2App (/home/jeff/dev/ang_proj/testProj/node_modules/angular-cli/lib/broccoli/angular2-app.js:53:23)\n    at module.exports (/home/jeff/dev/ang_proj/testProj/angular-cli-build.js:6:10)\n    at Class.module.exports.Task.extend.setupBroccoliBuilder (/home/jeff/dev/ang_proj/testProj/node_modules/angular-cli/node_modules/angular-cli/lib/models/builder.js:55:19)\n    at Class.module.exports.Task.extend.init (/home/jeff/dev/ang_proj/testProj/node_modules/angular-cli/node_modules/angular-cli/lib/models/builder.js:89:10)\n    at new Class (/home/jeff/dev/ang_proj/testProj/node_modules/angular-cli/node_modules/angular-cli/node_modules/core-object/core-object.js:18:12)\n    at Class.module.exports.Task.extend.run (/home/jeff/dev/ang_proj/testProj/node_modules/angular-cli/node_modules/angular-cli/lib/tasks/serve.js:15:19)\n    at /home/jeff/dev/ang_proj/testProj/node_modules/angular-cli/node_modules/angular-cli/lib/commands/serve.js:64:24\n    at lib$rsvp$$internal$$tryCatch (/home/jeff/dev/ang_proj/testProj/node_modules/angular-cli/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1036:16)\n    at lib$rsvp$$internal$$invokeCallback (/home/jeff/dev/ang_proj/testProj/node_modules/angular-cli/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1048:17)\n    at /home/jeff/dev/ang_proj/testProj/node_modules/angular-cli/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:331:11\n    at lib$rsvp$asap$$flush (/home/jeff/dev/ang_proj/testProj/node_modules/angular-cli/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1198:9)\n```\n","author":{"url":"https://github.com/jdell64","@type":"Person","name":"jdell64"},"datePublished":"2016-06-03T16:53:16Z","url":"https://github.com/angular/angular-cli/issues/999"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:da30ce74-755d-3cf7-dbb5-d959dfd88c75
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBF6C:3A6E49:2132023:2BDB4AC:6B057784
html-safe-nonce0ad80d3cd6d8a5ea8dadf3ce96366fe0b22ee76493ace6241c08195586052d89
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRjZDOjNBNkU0OToyMTMyMDIzOjJCREI0QUM6NkIwNTc3ODQiLCJ2aXNpdG9yX2lkIjoiNzY4MjU4MzQ2OTcyNDQ0NTQ5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac5a93b487acd8ffb4bbeaf660a9d86fd892184132e7054a0212c2aee88986c8ac
hovercard-subject-tagissue:158409558
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/999/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d2439e0d6826615210f4b8936b5aca480adfbcc9d079683d591b48db926314c4/angular/angular-cli/issues/999
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d2439e0d6826615210f4b8936b5aca480adfbcc9d079683d591b48db926314c4/angular/angular-cli/issues/999
og:image:altI have looked at a number of different issues (#274, #785, #845) and the wiki page (https://github.com/angular/angular-cli/wiki/3rd-party-libs) and I still cannot get a simple JS file to work in my...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejdell64
hostnamegithub.com
expected-hostnamegithub.com
None507b2d62524c0f595c35a2a2ee8a6ec54b119f245b3c59eaa070013b70ed1ada
turbo-cache-controlno-preview
go-importgithub.com/angular/angular-cli git https://github.com/angular/angular-cli.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id36891867
octolytics-dimension-repository_nwoangular/angular-cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id36891867
octolytics-dimension-repository_network_root_nwoangular/angular-cli
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee7a883ae3b439b8952652eaa7803e2587f30e339
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular-cli/issues/999#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fissues%2F999
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fissues%2F999
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangular-cli
Reloadhttps://github.com/angular/angular-cli/issues/999
Reloadhttps://github.com/angular/angular-cli/issues/999
Reloadhttps://github.com/angular/angular-cli/issues/999
angularhttps://github.com/angular
angular-clihttps://github.com/angular/angular-cli
Codehttps://github.com/angular/angular-cli
Issues198 (198)https://github.com/angular/angular-cli/issues
Pull requests24 (24)https://github.com/angular/angular-cli/pulls
Actionshttps://github.com/angular/angular-cli/actions
Security and quality8 (8)https://github.com/angular/angular-cli/security
Insightshttps://github.com/angular/angular-cli/insights
https://github.com/angular/angular-cli
New issuehttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/999
New issuehttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/999
Including a 3rd party libhttps://github.com/angular/angular-cli/issues/999#top
https://github.com/jdell64
jdell64https://github.com/jdell64
on Jun 3, 2016https://github.com/angular/angular-cli/issues/999#issue-158409558
#274https://github.com/angular/angular-cli/issues/274
#785https://github.com/angular/angular-cli/issues/785
#845https://github.com/angular/angular-cli/issues/845
https://github.com/angular/angular-cli/wiki/3rd-party-libshttps://github.com/angular/angular-cli/wiki/3rd-party-libs
filesaver.jshttps://www.npmjs.com/package/filesaver.js
https://github.com/jdell64
jdell64https://github.com/jdell64
on Jun 3, 2016https://github.com/angular/angular-cli/issues/999#issuecomment-223660170
https://github.com/JSMike
JSMikehttps://github.com/JSMike
on Jun 3, 2016https://github.com/angular/angular-cli/issues/999#issuecomment-223669699
https://github.com/jdell64
jdell64https://github.com/jdell64
on Jun 3, 2016https://github.com/angular/angular-cli/issues/999#issuecomment-223670458
https://github.com/jdell64/vigilant-goggles/tree/masterhttps://github.com/jdell64/vigilant-goggles/tree/master
https://github.com/JSMike
JSMikehttps://github.com/JSMike
on Jun 3, 2016https://github.com/angular/angular-cli/issues/999#issuecomment-223688852
https://github.com/JSMike
JSMikehttps://github.com/JSMike
on Jun 4, 2016https://github.com/angular/angular-cli/issues/999#issuecomment-223730993
@jdell64https://github.com/jdell64
https://github.com/jdell64
jdell64https://github.com/jdell64
on Jun 4, 2016https://github.com/angular/angular-cli/issues/999#issuecomment-223735815
@jdell64https://github.com/jdell64
https://github.com/jdell64https://github.com/jdell64
#999 (comment)https://github.com/angular/angular-cli/issues/999#issuecomment-223730993
https://github.com/notifications/unsubscribe/AA0oYFVWG4-FeeN5sqPOIzCN-58i-Kchks5qIOIXgaJpZM4Ittqhttps://github.com/notifications/unsubscribe/AA0oYFVWG4-FeeN5sqPOIzCN-58i-Kchks5qIOIXgaJpZM4Ittq
https://github.com/JSMike
JSMikehttps://github.com/JSMike
on Jun 4, 2016https://github.com/angular/angular-cli/issues/999#issuecomment-223742532
https://www.typescriptlang.org/docs/handbook/modules.htmlhttps://www.typescriptlang.org/docs/handbook/modules.html
https://github.com/filipesilva
filipesilvahttps://github.com/filipesilva
on Jun 4, 2016https://github.com/angular/angular-cli/issues/999#issuecomment-223761781
@JSMikehttps://github.com/JSMike
filipesilvahttps://github.com/filipesilva
completedhttps://github.com/angular/angular-cli/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jun 4, 2016https://github.com/angular/angular-cli/issues/999#event-681951920
https://github.com/jdell64
jdell64https://github.com/jdell64
on Jun 4, 2016https://github.com/angular/angular-cli/issues/999#issuecomment-223761868
https://www.typescriptlang.org/docs/handbook/modules.htmlhttps://www.typescriptlang.org/docs/handbook/modules.html
#999 (comment)https://github.com/angular/angular-cli/issues/999#issuecomment-223742532
https://github.com/notifications/unsubscribe/AA0oYJJf5Sm7ZMGLEGd-41rgfda8SduLks5qIS4kgaJpZM4Ittqhttps://github.com/notifications/unsubscribe/AA0oYJJf5Sm7ZMGLEGd-41rgfda8SduLks5qIS4kgaJpZM4Ittq
https://github.com/JSMike
JSMikehttps://github.com/JSMike
on Jun 6, 2016https://github.com/angular/angular-cli/issues/999#issuecomment-223875078
@jdell64https://github.com/jdell64
https://github.com/apps/angular-automatic-lock-bot
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Sep 5, 2019https://github.com/angular/angular-cli/issues/999#issuecomment-528619269
automatic conversation locking policyhttps://github.com/angular/angular/blob/67d80f/docs/GITHUB_PROCESS.md#conversation-locking
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Sep 5, 2019https://github.com/angular/angular-cli/issues/999#event-2612562692
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular-cli/issues/999
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/999
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.