Giter Site home page Giter Site logo

browserify-list-issue's Introduction

NODE_PATH works with browserify:

Regular browserify (output to module.js)...
NODE_PATH=/tmp/browserify-list-issue/assets browserify specs/a_spec.js > module.js

And module contents is:

(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
var a = require('a');

console.log('a is "a": ', a === 'a');

},{"a":2}],2:[function(require,module,exports){
module.exports = 'a';

},{}]},{},[1])

NODE_PATH does not work with browserify --list:

browserify --list ...
NODE_PATH=/tmp/browserify-list-issue/assets browserify --list specs/a_spec.js

stream.js:94
      throw er; // Unhandled stream error in pipe.
            ^
Error: Cannot find module 'a' from '/private/tmp/browserify-list-issue/specs'
    at /usr/local/share/npm/lib/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:44:17
    at process (/usr/local/share/npm/lib/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:110:43)
    at /usr/local/share/npm/lib/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:119:21
    at load (/usr/local/share/npm/lib/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:54:43)
    at /usr/local/share/npm/lib/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:60:22
    at /usr/local/share/npm/lib/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:16:47
    at Object.oncomplete (fs.js:107:15)

browserify-list-issue's People

Contributors

cymen avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.