NPM #87

Open
chrisvdb opened this Issue Jul 17, 2015 · 5 comments

Projects

None yet

4 participants

Would it be possible to publish this to NPM in addition to Bower?

'formatter' already seems to be taken, though: https://www.npmjs.com/package/formatter

sibljon commented Aug 5, 2015

When I npm install formatter.js and var Formatter = require('formatter.js');, I get the following error in the console:

Cannot find module 'pattern-matcher' from '/path/to/my/app/node_modules/formatter.js/dist/common'

but pattern-matcher.js is indeed in node_modules/formatter.js/dist/common.

Also, I have the following reported by Flow:

Failure("internal error: package /path/to/my/app/node_modules/formatter.js/package.json not found")

But package.json is indeed in that directory as well.

Apologies if I'm doing something wrong in my local setup (though I have been able to install many other modules via npm in the same app)! Just wanted to post this in case anyone else is having trouble using formatter.js via npm.

I ran into this problem today, forked it and fixed the issue.

If you need it to work you can use https://github.com/mypebble/formatter.js

On Wednesday, 5 August 2015, Jonathan Sibley notifications@github.com
wrote:

When I npm install formatter.js and var Formatter =
require('formatter.js');, I get the following error in the console:

Cannot find module 'pattern-matcher' from
'/path/to/my/app/node_modules/formatter.js/dist/common'

but pattern-matcher.js is indeed in node_modules/formatter.js/dist/common.

Also, I have the following reported by Flow:

Failure("internal error: package
/path/to/my/app/node_modules/formatter.js/package.json not found")

But package.json is indeed in that directory as well.

Apologies if I'm doing something wrong in my local setup (though I have
been able to install many other modules via npm in the same app)! Just
wanted to post this in case anyone else is having trouble using
formatter.js via npm.


Reply to this email directly or view it on GitHub
#87 (comment)
.

https://www.npmjs.com/package/formatter.js it's already on there

Thanks, that worked!

I'm leaving this issue open for now as sibljon's issue might not be resolved yet.

crobinson42 commented Sep 6, 2016 edited

+1 This is still an issue.

> var f = require("formatter.js")
Error: Cannot find module 'formatter.js'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at repl:1:9
    at sigintHandlersWrap (vm.js:22:35)
    at sigintHandlersWrap (vm.js:96:12)
    at ContextifyScript.Script.runInThisContext (vm.js:21:12)
    at REPLServer.defaultEval (repl.js:313:29)
    at bound (domain.js:280:14)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment