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
Describe the bug
Adding near-sdk-as to a project currently fails when using npm (it works with yarn)
⮀ npm i -S near-sdk-as
> near-vm@1.1.0 preinstall /Users/chadoh/code/proj/node_modules/near-vm
> node ./uninstall.js
npm WARN near-sdk-bindgen@2.1.2 requires a peer of assemblyscript@^0.9.4 but none is installed. You must install peer dependen
cies yourself.
npm WARN visitor-as@0.3.2 requires a peer of assemblyscript@^0.13.3 but none is installed. You must install peer dependencies
yourself.
npm WARN @as-pect/cli@4.0.0 requires a peer of assemblyscript@^0.12.0 but none is installed. You must install peer dependencie
s yourself.
npm WARN @as-pect/assembly@4.0.0 requires a peer of assemblyscript@^0.12.0 but none is installed. You must install peer depend
encies yourself.
npm WARN @as-pect/core@4.0.0 requires a peer of assemblyscript@^0.12.0 but none is installed. You must install peer dependenci
es yourself.
npm WARN proj@1.0.0 No description
npm WARN proj@1.0.0 No repository field.
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /Users/chadoh/code/proj/node_modules/asbuild/bin/asp
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/chadoh/code/proj/node_modules/asbuild/bin/asp'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
To Reproduce
Steps to reproduce the behavior:
1. initialize a new project with npm init. I used Node 12.
2. Run npm i -S near-sdk-as
Expected behavior
near-sdk-as should always work with npm in addition to yarn
Screenshots
The text was updated successfully, but these errors were encountered:
@willemneal this also means that packages are not installed correctly for AssemblyScript projects created with create-near-app. Specifically, asbuild is not installed, so npm run build, which runs asb, does not work.
I've tried reverting to older versions of near-sdk-as in create-near-app's contract/package.json, but near-sdk-as uses a ^ version specification for asbuild. This means that in versions of near-sdk-as that use "asbuild": "^0.0.8", npm will still use asbuild@0.0.9, which is probably where the problem was introduced.
I still get the error, even before npm gets to the step of creating a package-lock.json, so I can't tell if it tried to use the correct version of asbuild.
chadoh
added a commit
to near/create-near-app
that referenced
this issue
Dec 16, 2020
Works around near/near-sdk-as#337
create-near-app is currently broken with all 2.x.x versions of
near-sdk-as. Using v1.0.0 works, so let's roll back for now.
Also, this uses a specific version, since contracts can be even more
sensitive to version changes than frontend apps, and we already started
being more careful with our frontend package.json versioning:
#532
Describe the bug
Adding near-sdk-as to a project currently fails when using npm (it works with yarn)
To Reproduce
Steps to reproduce the behavior:
1. initialize a new project with
npm init
. I used Node 12.2. Run
npm i -S near-sdk-as
Expected behavior
near-sdk-as should always work with npm in addition to yarn
Screenshots
The text was updated successfully, but these errors were encountered: