Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gets either Cannot find package or SyntaxError: Cannot use import statement outside a module #42

Open
archywillhe opened this issue Oct 10, 2023 · 1 comment

Comments

@archywillhe
Copy link

archywillhe commented Oct 10, 2023

tried to yarn installed the project and got

/Users/arch/typescript-swc-starter/node_modules/victor-db/victor_db.js:1
import * as wasm from "./victor_db_bg.wasm";
^^^^^^

for import pkg from "victor-db/victor_db.js";

or using either import pkg from "victor-db" or import pkg from "victor" and I will get

  throw new ERR_MODULE_NOT_FOUND(
        ^
CustomError: Cannot find package '/Users/arch/typescript-swc-starter/node_modules/victor-db/'
@archywillhe archywillhe changed the title SyntaxError: Cannot use import statement outside a module gets either Cannot find package or SyntaxError: Cannot use import statement outside a module Oct 10, 2023
@archywillhe
Copy link
Author

not quite sure why but the not-found problem is resolved if npm install locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant