You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run npm run asbuild - it should compile without error
Run npm install json-as
Modify asconfig.json to add "transform": ["json-as/transform"] to the existing options section
Run npm run asbuild again - it fails with:
FAILURE Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'visitor-as' imported from /<projectdir>/node_modules/json-as/transform/lib/index.js
at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
at new NodeError (node:internal/errors:405:5)
at packageResolve (node:internal/modules/esm/resolve:890:9)
at moduleResolve (node:internal/modules/esm/resolve:939:20)
at defaultResolve (node:internal/modules/esm/resolve:1132:11)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:835:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:77:40)
at link (node:internal/modules/esm/module_job:76:36)
Tried manually installing with npm install visitor-as --save-dev, but that gives:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/assemblyscript
npm ERR! dev assemblyscript@"^0.27.14" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer assemblyscript@"^0.25.0" from [email protected]
npm ERR! node_modules/visitor-as
npm ERR! dev visitor-as@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
It does work if I use --force, but I shouldn't have to do that.
Not sure if this is a problem with as-json, or with visitor-as, or both.
Thanks.
The text was updated successfully, but these errors were encountered:
To clarify, if I use --force or --legacy-peer-deps, it adds visitor-as to the devDependencies section correctly, but future calls to npm install (such as on a fresh clone of my project repo) still fail with the same message.
Steps to reproduce:
npm run asbuild
- it should compile without errornpm install json-as
asconfig.json
to add"transform": ["json-as/transform"]
to the existingoptions
sectionnpm run asbuild
again - it fails with:Tried manually installing with
npm install visitor-as --save-dev
, but that gives:It does work if I use
--force
, but I shouldn't have to do that.Not sure if this is a problem with
as-json
, or withvisitor-as
, or both.Thanks.
The text was updated successfully, but these errors were encountered: