assemblyscript-temporal icon indicating copy to clipboard operation
assemblyscript-temporal copied to clipboard

Unable to build from project

Open zzhjerry opened this issue 2 years ago • 1 comments

While following the official tutorial to setup and build code with assemblyscript-temporal imported, the npm run asbuild command gives the following error


> [email protected] asbuild /Users/abc/study/assemblyscript/test-temporal
> npm run asbuild:untouched && npm run asbuild:optimized


> [email protected] asbuild:untouched /Users/abc/study/assemblyscript/test-temporal
> asc assembly/index.ts --target debug

ERROR TS2304: Cannot find name 'DurationLike'.

   add<T = DurationLike>(
           ~~~~~~~~~~~~
 in ~lib/assemblyscript-temporal/plaindatetime.ts(319,11)

ERROR TS2339: Property 'toString' does not exist on type 'i32'.

   console.log(one.toString())
                   ~~~~~~~~
 in assembly/index.ts(7,19)

FAILURE 2 compile error(s)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] asbuild:untouched: `asc assembly/index.ts --target debug`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] asbuild:untouched script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/abc/.npm/_logs/2021-07-28T07_46_07_883Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] asbuild: `npm run asbuild:untouched && npm run asbuild:optimized`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] asbuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/abc/.npm/_logs/2021-07-28T07_46_07_915Z-debug.log

zzhjerry avatar Jul 28 '21 07:07 zzhjerry

The project does build from a clean install - you can see that via the GitHub actions:

https://github.com/ColinEberhardt/assemblyscript-temporal/actions

However, the build doesn't run the npm run asbuild script.

What happens if you run npm test?

ColinEberhardt avatar Jul 28 '21 16:07 ColinEberhardt