Skip to content
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

Having issues using Browserify with CanJS 3 #2794

Closed
chasenlehara opened this issue Nov 29, 2016 · 7 comments
Closed

Having issues using Browserify with CanJS 3 #2794

chasenlehara opened this issue Nov 29, 2016 · 7 comments

Comments

@chasenlehara
Copy link
Member

When I tried to use a module like can-define/map/map, I get this error when I build with Browserify:

Error: Cannot find module 'cssify' from '~/canjs-browserify-npm/node_modules/can-observation'
    at ~/.nvm/versions/node/v6.9.1/lib/node_modules/browserify/node_modules/resolve/lib/async.js:46:17
    at process (~/.nvm/versions/node/v6.9.1/lib/node_modules/browserify/node_modules/resolve/lib/async.js:173:43)
    at ondir (~/.nvm/versions/node/v6.9.1/lib/node_modules/browserify/node_modules/resolve/lib/async.js:188:17)
    at load (~/.nvm/versions/node/v6.9.1/lib/node_modules/browserify/node_modules/resolve/lib/async.js:69:43)
    at onex (~/.nvm/versions/node/v6.9.1/lib/node_modules/browserify/node_modules/resolve/lib/async.js:92:31)
    at ~/.nvm/versions/node/v6.9.1/lib/node_modules/browserify/node_modules/resolve/lib/async.js:22:47
    at FSReqWrap.oncomplete (fs.js:123:15)

I’ve created a repo to demo this issue. Here’s the code in my can-define-map branch that demonstrates the issue: https://github.com/chasenlehara/canjs-browserify-npm/blob/can-define-map/main.js

Requiring a module like can-util works correctly (master branch): https://github.com/chasenlehara/canjs-browserify-npm/blob/master/main.js

Please let me know if this is a CanJS bug or if I need to do more setup to make it work with Browserify.

@matthewp
Copy link
Contributor

matthewp commented Nov 29, 2016

The problem seems to be that a bunch of packages have a cssify transform listed even though they don't have anything to do with CSS. Going to post subissues as I find them:

@matthewp
Copy link
Contributor

Those are the only issues.

@matthewp
Copy link
Contributor

Fixed those two issues and it looks to be working fine now. Reopen if you see otherwise.

@chasenlehara
Copy link
Member Author

Reopening because can-stache has the same issue: https://github.com/canjs/can-stache/blob/master/package.json#L31

@matthewp
Copy link
Contributor

@matthewp
Copy link
Contributor

@chasenlehara this should be fixed now.

@chasenlehara
Copy link
Member Author

Thanks @matthewp, I will test the new releases either today or tomorrow. Closing for now.

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

No branches or pull requests

2 participants