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.

Import a script inside a component or api cause an error

See original GitHub issue

Hey!

I’m trying to call a script outside my aleph project (I am on a monorepo project).

import React from "https://esm.sh/react";
import a from "../../dt-gitlab-wrapper/index.ts";

const b = new a("1");

export default function Runners() {
...
}

When I do that I get the following error: image

It’s normal behavior? We can’t call a script outside the component?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ijecommented, Jan 30, 2021

please use synlimk as workaround currently

1reaction
ijecommented, Jan 30, 2021

i seems the git-wrapper is out of your aleph app scope that alephjs can’t handle it, I will fix this, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Uncaught SyntaxError: Cannot use import statement outside ...
There are three ways to solve this:- · 1. The first: In the script, include type=module · 2. The second: In node.js, into...
Read more >
Troubleshooting common React Native bugs - LogRocket Blog
This troubleshooting guide shares how to easily find and address common React Native bugs. See common error examples.
Read more >
The Script element - HTML: HyperText Markup Language
This attribute specifies the URI of an external script; this can be used as an alternative to embedding a script directly within a...
Read more >
Troubleshooting - Astro Documentation
Solution: Try looking for errors in any component you are importing and rendering, and make sure it's working correctly. Consider opening an Astro...
Read more >
Error Messages | Cypress Documentation
If you are setting Cypress defaults or utilizing custom Cypress commands, instead of needing to import/require those defaults/commands in every test file, you ......
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