question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Scatter fails at compile time in Angular project

See original GitHub issue

I get the following error:

ERROR in ./node_modules/cipher-base/index.js
Module not found: Error: Can't resolve 'stream' in '/Users/mwawrusch/Dev/d1/node_modules/cipher-base'
ERROR in ./node_modules/hash-base/index.js
Module not found: Error: Can't resolve 'stream' in '/Users/mwawrusch/Dev/d1/node_modules/hash-base'

my versions:

"scatterjs-core": "2.7.7",
        "scatterjs-plugin-eosjs2": "1.5.0",
        "scatterjs-plugin-lynx": "1.5.0",

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
shawnrmosscommented, May 27, 2019

For angular 6+ make sure to run npm i -D @babel/runtime

Create a patch.js file with the following: const fs = require(‘fs’); const f = ‘node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js’;

fs.readFile(f, ‘utf8’, function (err,data) { if (err) { return console.log(err); } let result = data.replace(/node: false/g, “node: {crypto: true, stream: true, fs: ‘empty’, net: ‘empty’}”);

fs.writeFile(f, result, ‘utf8’, function (err) { if (err) return console.log(err); }); });

Add to your package.json “scripts”: { “postinstall”: “node patch.js”,

1reaction
nsjamescommented, Jan 30, 2019

Also, can you test without the lynx plugin? Perhaps there’s something in there which isn’t transpiling properly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compiling Angular Libraries Properly in a Multi-Framework ...
In a nutshell, this is what causes the compiler error: at project compile time, the Angular compiler expects ngc -compiled JavaScript ...
Read more >
Can I make the Angular Compiler throw an error when a non ...
It wont stop you from compiling but still show a error. TS Lint will validate method,property not found in the component.
Read more >
Identify and Fix Build and Deployment Errors in Your Angular ...
In this guide, you will learn how to spot some of the most common build and deployment errors and how to resolve them...
Read more >
Data visualization in Angular using D3.js - LogRocket Blog
Learn how to create bar charts, pie charts, and scatter plots in your Angular app using the data visualization library D3.js.
Read more >
Ahead-of-time (AOT) compilation - Angular
There's no need to download the Angular compiler if the application is already compiled. The compiler is roughly half of Angular itself, so...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found