Questions tagged [stackblitz]

StackBlitz is an online IDE powered by Visual Studio Code, used for creating web applications. It provides rich editing and sharing features, like CodePen or JSFiddle. Use this tag when you have a question about one of its features or when you are encountering a problem in conjunction with using this tool for programming.

StackBlitz is an online IDE for web applications, powered by Visual Studio Code. It provides rich editing and sharing features, like CodePen or JSFiddle.

StackBlitz

236 questions
3
votes
1 answer

Injection using an InjectionToken?

Attempting to inject an object using an InjectionToken. In the AppModule I have: export const tokenConfigKey = new InjectionToken('config'); const tokenBasedConfig = { provide: tokenConfigKey, useValue: { key:…
Ole
  • 41,793
  • 59
  • 191
  • 359
3
votes
1 answer

How to export a TypeScript project from StackBlitz

Is there a way to export a TypeScrpit project created on StackBlitz using the "TypeScript Blank Project" template and run it anywhere else? If you just download it, you will get an empty package.json with no run scripts or devDependencies. What…
Marius
  • 3,253
  • 5
  • 25
  • 29
3
votes
1 answer

Loading Local JSON in Angular on Stackblitz

In general as noted here it's pretty straight forward: import data from './data.json'; However this does not work in Stackblitz Angular projects. The linked project logs the following: preview-3a0c9433aa42f56dbd90b.js:1 SyntaxError: Unexpected…
Ole
  • 41,793
  • 59
  • 191
  • 359
3
votes
1 answer

I am Could not share my online code snippets via stackblitz online editor?

Created some snippets via StackBlitz editor and saved the code, but after sharing url (or copy url) the stackblitz opened it in default condition(so my custom code gone). Why stackblitz not sharing my code ?
a_main
  • 377
  • 1
  • 6
  • 13
3
votes
1 answer

Running in-browser development server [like stackblitz/codesandbox]

The Question: How to run a live in-browser dev server? Context Stackblitz and CodeSandbox are two platforms that provide online IDE to develop web applications. I have a similar use case, and would need to run an in browser dev server, but there's…
3
votes
2 answers

Angular Load routes from API $$_lazy_route_resource lazy recursive error

I am getting the error: Cannot find module 'src/app/settings/settings.module'. at eval (eval at ./src/$$_lazy_route_resource lazy recursive When trying to add lazy loaded modules from my api. What makes this difficult for me to debug is the…
Kevin192291
  • 1,925
  • 4
  • 26
  • 43
2
votes
2 answers

How to add component to StackBlitz Angular project?

I created basic Angular project on StackBlitz, and want to add my component. I right-click on src folder, Angular Generator > Component > test, which created folder 'test' with test component. But, when I try to add this component to my-app…
sam sergiy klok
  • 526
  • 7
  • 17
2
votes
1 answer

Stackblitz commit doesn't seem to update Github

According to StackBlitz synchronization with github - upload to from StackBlitz to github it is possible to commit from Stackblitz to Github. But when I tried it doesn't seem to do so. When I checked Github Repo I still have my old Readme compared…
2
votes
1 answer

Cannot find module 'rxjs' or its corresponding type declarations.(2307) using Angular stackblitz

While using stackblitz with an Angular 12 - rxjs 7 project. I'm getting this error while trying to import a Subject: Cannot find module 'rxjs' or its corresponding type declarations.(2307) Am I using a wrong version of typescript? Error…
eko
  • 39,722
  • 10
  • 72
  • 98
2
votes
2 answers

Pattern error in React JS traffic light simulator

I am trying to build a traffic light using ReactJS. I need the traffic light to go in the order red, yellow, green, red, yellow, green, etc. My current code gives me a different pattern. I don't know quite how to work with setInterval on this one…
Vasila_M
  • 53
  • 6
2
votes
1 answer

StackBlitz Ionic 5 Vue 3 sample: Import error, can't find file index.cjs.js

I want to create a Ionic 5 Vue 3 sample: https://stackblitz.com/edit/vue-ionic-attempt-qj2xsx? But its always telling me: Import error, can't find file: ./cjs/index.cjs.js Any idea how to solve this?
gurehbgui
  • 14,236
  • 32
  • 106
  • 178
2
votes
3 answers

Object too large to inspect. Open your browser console to view?

This is inspired by the stackblitz example of Angular application. Im seeing error specifically telling: Error: Object too large to inspect. Open your browser console to view. When I open the stackblitz console and browser console it specifies the…
Selaka Nanayakkara
  • 3,296
  • 1
  • 22
  • 42
2
votes
1 answer

Stackblitz: change compilation target to es6

Stackblitz compiles the code to es5 (or es3). The problem is that web components need the class notation in order to work. In the example here, I'm trying to use the 3rd party @material web components. Is there any way to tell stackblitz not to…
yccteam
  • 2,168
  • 4
  • 25
  • 47
2
votes
0 answers

StackBlitz and raw-loader

Trying to publish my Angular app into StackBlitz via git-repo but suddenly getting an error: Can't find package:!!raw-loader!. In my code I use it to load my .svg icons like this import remove from '!!raw-loader!./icons/ban-solid.svg'; I did`t…
Imme
  • 21
  • 4
2
votes
1 answer

Stackblitz: Can't Find Empty Package

I am trying to get my Angular app to spin up in Stackblitz but it keeps throwing the error message 'Can't find package: [blank]: Stackblitz link I have set project up in exactly the same way as VS Code and have tried googling to no avail - any help…
sad muso
  • 91
  • 8