Skip to content
This repository was archived by the owner on Aug 4, 2021. It is now read-only.

Conversation

@nkoterba
Copy link

Please see:

#38
and
browserify/browser-resolve#80

for how Node v6+ throws a TypeError if path.dirname is passed an undefined value. node-browser-resolve currently does not use set a default value if it's opts.filename is not specified resulting in the following stack trace:

[19:40:45] TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.dirname (path.js:1324:5)
    at resolve (/my_app/node_modules/browser-resolve/index.js:218:21)
    at /my_app/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs.js:46:5
    at resolveId (/my_app/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs.js:45:11)
    at /my_app/node_modules/rollup/dist/rollup.js:2123:32
    at tryCatch (/my_app/node_modules/rollup/dist/rollup.js:393:12)
    at invokeCallback (/my_app/node_modules/rollup/dist/rollup.js:405:13)
    at publish (/my_app/node_modules/rollup/dist/rollup.js:376:7)
    at flush (/my_app/node_modules/rollup/dist/rollup.js:120:5)

Please see:

rollup#38
and
browserify/browser-resolve#80

for how Node v6+ throws a TypeError if `path.dirname` is passed an undefined value.  `node-browser-resolve` currently does not use set a default value if it's `opts.filename` is not specified resulting in the following stack trace:
```javascript
[19:40:45] TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.dirname (path.js:1324:5)
    at resolve (/my_app/node_modules/browser-resolve/index.js:218:21)
    at /my_app/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs.js:46:5
    at resolveId (/my_app/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs.js:45:11)
    at /my_app/node_modules/rollup/dist/rollup.js:2123:32
    at tryCatch (/my_app/node_modules/rollup/dist/rollup.js:393:12)
    at invokeCallback (/my_app/node_modules/rollup/dist/rollup.js:405:13)
    at publish (/my_app/node_modules/rollup/dist/rollup.js:376:7)
    at flush (/my_app/node_modules/rollup/dist/rollup.js:120:5)
```
@Rich-Harris
Copy link
Contributor

thanks – closing, see #38 (comment)

@Rich-Harris Rich-Harris closed this Jun 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants