angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Trouble with angular-1.0.0-beta.28.3 and plotly.js

Open ghost opened this issue 9 years ago • 10 comments

Please provide us with the following information:

OS?

Linux (Ubuntu)

Versions.

angular-cli: 1.0.0-beta.28.3 node: 6.9.1 os: linux x64 @angular/common: 2.4.5 @angular/compiler: 2.4.5 @angular/core: 2.4.5 @angular/forms: 2.4.5 @angular/http: 2.4.5 @angular/platform-browser: 2.4.5 @angular/platform-browser-dynamic: 2.4.5 @angular/router: 3.4.5 @angular/compiler-cli: 2.4.5

Repro steps.

App create from a previous version of angular-cli. Since I update to 1.0.0-beta.28.3 my app doesn't anymore unless I remove Plotly.js from the scripts array in angular-cli.json :

"scripts": [
        "../node_modules/plotly.js/dist/plotly.js",
        "../node_modules/papaparse/papaparse.min.js"
      ],

When I remove Plotly.js everything come back to normal, but I can't use Plotly.js anymore :/

The log given by the failure.

No log, neither in my terminal and my console. The app stay on the 'Loading' state.

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

ghost avatar Feb 02 '17 15:02 ghost

This is still a problem in the v1.0.0-beta.30 release.

frederikaalund avatar Feb 06 '17 13:02 frederikaalund

This is problem with v1.0.0-rc.1 as well.

tarnasky avatar Mar 06 '17 21:03 tarnasky

I have no idea what plotly is, how to use it, or how to reproduce this error.

Can you provide me with a simple repro I can follow to see this issue?

filipesilva avatar Mar 09 '17 11:03 filipesilva

ng new plotlytest
cd ./plotlytest
npm i plotly.js --save

(at this point, if you do 'npm start', the page will display 'app works')

Now you need to add plotly into the .angular-cli.json scripts :

"scripts": [
       "../node_modules/plotly.js/dist/plotly.js"
      ],

npm start

You will see that the app stay on 'loading' state

ghost avatar Mar 09 '17 13:03 ghost

@jderuere I have found a workaround for this. It happens because plotly.js imports es6-promise. Just comment out the linerequire('es6-promise').polyfill() in plotly.js. It'll work fine after that.

Another way is to import plotly.js before zone.js in src/polyfills.ts

prateek0103 avatar Mar 20 '17 05:03 prateek0103

@prateek0103 What was the line you added to src/polyfill.ts to import plotly.js?

tarnasky avatar Apr 05 '17 19:04 tarnasky

@tarnasky in polyfill.ts, right before import 'zone.js/dist/zone'; Write import 'plotly.js/dist/plotly.js'

prateek0103 avatar Apr 06 '17 11:04 prateek0103

I get this error:

browser.js:2 Uncaught Error: It appears that you're using glslify in browserify without its transform applied. Make sure that you've set up glslify as a source transform: https://github.com/substack/node-browserify#browserifytransform

sgentile avatar May 08 '17 13:05 sgentile

Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version.

If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.

filipesilva avatar May 22 '17 15:05 filipesilva

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.