Skip to content

asc: Cannot find module 'glob' #205

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
xtuc opened this issue Aug 3, 2018 · 2 comments
Closed

asc: Cannot find module 'glob' #205

xtuc opened this issue Aug 3, 2018 · 2 comments

Comments

@xtuc
Copy link

xtuc commented Aug 3, 2018

Steps to reproduce:

  • npm install --save-dev AssemblyScript/assemblyscript
  • asc

Throws:

/node_modules/binaryen/index.js:7
if(n){q=__dirname+"/";var da,ea;a.read=function(b,e){var c=r(b);c||(da||(da=require("fs")),ea||(ea=require("path")),b=ea.normalize(b),c=da.readFileSync(b));return e?c:c.toString()};a.read
Binary=function(b){b=a.read(b,!0);b.buffer||(b=new Uint8Array(b));assert(b.buffer);return b};1<process.argv.length&&(a.thisProgram=process.argv[1].replace(/\\/g,"/"));a.arguments=process.
argv.slice(2);process.on("uncaughtException",function(b){if(!(b instanceof fa))throw b;});process.on("unhandledRejection",function(){process.exit(1)});



Error: Cannot find module 'glob'
    at Function.Module._resolveFilename (module.js:555:15)
    at Function.Module._load (module.js:482:25)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at exports.libraryFiles.exports.isBundle (/node_modules/assemblyscript/cli/asc.js:78:20)
    at Object.<anonymous> (/node_modules/assemblyscript/cli/asc.js:82:3)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
@liangchunn
Copy link

Same issue, seems like glob should have been a dependency rather than a devDependency in package.json.

A simple npm i -S glob fixed it for me.

@dcodeIO dcodeIO closed this as completed in c769f65 Aug 4, 2018
@dcodeIO
Copy link
Member

dcodeIO commented Aug 4, 2018

Thanks, glob is now a production dependency again. The intent here was to use the dist files, that do not require glob because all files are bundled, but that's obviously not completed yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants