Repository: AssemblyScript/assemblyscript

Issue #2784: Possible regression after the latest release
Created: 2023-11-09T10:30:09Z
Bug description
The latest release broke my workflow. I suspect due to #2757.
Steps to reproduce
npm install --no-save assemblyscript
./node_modules/.bin/asc foo.ts

node:internal/errors:491
    ErrorCaptureStackTrace(err);
    ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '.../node_modules/assemblyscript/dist/asc.js' imported from .../node_modules/assemblyscript/bin/asc.js
    at __node_internal_captureLargerStackTrace (node:internal/errors:491:5)
    at new NodeError (node:internal/errors:400:5)
    at finalizeResolution (node:internal/modules/esm/resolve:326:11)
    at moduleResolve (node:internal/modules/esm/resolve:945:10)
    at defaultResolve (node:internal/modules/esm/resolve:1153:11)
    at nextResolve (node:internal/modules/esm/loader:163:28)
    at ESMLoader.resolve (node:internal/modules/esm/loader:842:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
    at ESMLoader.import (node:internal/modules/esm/loader:525:22)
    at importModuleDynamically (node:internal/modules/esm/translators:110:35)
    at importModuleDynamicallyCallback (node:internal/process/esm_loader:35:14)
    at file:///.../node_modules/assemblyscript/bin/asc.js:29:21
    at ModuleJob.run (node:internal/modules/esm/module_job:194:25) {
  code: 'ERR_MODULE_NOT_FOUND'
}

Node.js v18.13.0

AssemblyScript version
v0.27.16

Duplicate issue #2787: Getting ERR_MODULE_NOT_FOUND after recent PR, basic AssemblyScript example fails
Created: 2023-11-09T17:28:06Z
Bug description
Hello there,
I've encountered an issue after a recent pull request merge where even the basic AssemblyScript example (from the official Getting Started guide) is no longer working. This was functional just before the latest changes were introduced.
Here's the error message I'm receiving:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/julianmedina/Desktop/CraftyEngine/wasm/StringArtStudio/node_modules/assemblyscript/dist/asc.js' imported from /Users/julianmedina/Desktop/CraftyEngine/wasm/StringArtStudio/node_modules/assemblyscript/bin/asc.js at __node_internal_captureLargerStackTrace (node:internal/errors:490:5) at new NodeError (node:internal/errors:399:5) at finalizeResolution (node:internal/modules/esm/resolve:231:11) at moduleResolve (node:internal/modules/esm/resolve:850:10) at defaultResolve (node:internal/modules/esm/resolve:1058: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:416:18) at ESMLoader.import (node:internal/modules/esm/loader:517:22) at importModuleDynamically (node:internal/modules/esm/translators:108:35) at importModuleDynamicallyCallback (node:internal/modules/esm/utils:85:14) at file:///Users/julianmedina/Desktop/CraftyEngine/wasm/StringArtStudio/node_modules/assemblyscript/bin/asc.js:29:21 at ModuleJob.run (node:internal/modules/esm/module_job:193:25) { code: 'ERR_MODULE_NOT_FOUND' }
Steps to reproduce
Not even the Assemblyscript example works now
https://www.assemblyscript.org/getting-started.html#setting-up-a-new-project
AssemblyScript version
^0.27.15

Closing comment (2023-11-09T17:53:31Z): Duplicate of #2784.