panoply/spx

script loaded from cdn is not working

Opened this issue · 2 comments

I tried using the cdn version, on mac and on win11 withthoult success.
error is:

TypeError: Failed to resolve module specifier "detect-it". Relative references must start with either "/", "./", or "../".

Yeah, the version on NPM registry is still in beta. Though I use it in prod for my projects, I have yet to publish a stable release. However, you can find the docs for release candidate here:

https://65fd9b89430d3e14c7cca763--spxjs.netlify.app

You can install directly from github repo opposed to pulling in via NPM registry or using CDN:

pnpm add github:panoply/spx

Follow the tutorial:
https://65fd9b89430d3e14c7cca763--spxjs.netlify.app/tutorial/

node_modules/.pnpm/spx@https+++codeload.github.com+panoply+spx+tar.gz+b696287915fc375967c6e0c3924c5f26dfbd4b4f/node_modules/spx/index.d.ts:2:21 - error TS2307: Cannot find module './types/namespace' or its corresponding type declarations.

2 export { SPX } from './types/namespace';
                      ~~~~~~~~~~~~~~~~~~~

node_modules/.pnpm/spx@https+++codeload.github.com+panoply+spx+tar.gz+b696287915fc375967c6e0c3924c5f26dfbd4b4f/node_modules/spx/types/components.d.ts:5:37 - error TS2307: Cannot find module './namespace' or its corresponding type declarations.

5 import type { SPX, TypeState } from './namespace';
                                      ~~~~~~~~~~~~~

node_modules/.pnpm/spx@https+++codeload.github.com+panoply+spx+tar.gz+b696287915fc375967c6e0c3924c5f26dfbd4b4f/node_modules/spx/types/components.d.ts:6:23 - error TS2307: Cannot find module 'src/shared/enums' or its corresponding type declarations.

6 import { Hooks } from 'src/shared/enums';
                        ~~~~~~~~~~~~~~~~~~

node_modules/.pnpm/spx@https+++codeload.github.com+panoply+spx+tar.gz+b696287915fc375967c6e0c3924c5f26dfbd4b4f/node_modules/spx/types/page.d.ts:2:32 - error TS2307: Cannot find module '../src/shared/enums' or its corresponding type declarations.

2 import type { VisitType } from '../src/shared/enums';
                                 ~~~~~~~~~~~~~~~~~~~~~


Found 4 errors in 3 files.

Errors  Files
     1  node_modules/.pnpm/spx@https+++codeload.github.com+panoply+spx+tar.gz+b696287915fc375967c6e0c3924c5f26dfbd4b4f/node_modules/spx/index.d.ts:2
     2  node_modules/.pnpm/spx@https+++codeload.github.com+panoply+spx+tar.gz+b696287915fc375967c6e0c3924c5f26dfbd4b4f/node_modules/spx/types/components.d.ts:5
     1  node_modules/.pnpm/spx@https+++codeload.github.com+panoply+spx+tar.gz+b696287915fc375967c6e0c3924c5f26dfbd4b4f/node_modules/spx/types/page.d.ts:2

a bunch of errors. LAst year I was able to build the spx script but not now