-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
TypeScript Version: 2.6.0-dev.20170909
Code
// "moduleResolution": "node"
// src/index.ts
// Cannot find module '@foo/bar'
import { qux } from '@foo/bar';
// node_modules/foo/bar/package.json
// "main": "whatever.js"
// node_modules/foo/bar/whatever.js
export function qux () { }Expected behavior:
See the module resolution documentation
Scoped package detected, looking in 'foo__bar'
Loading module '@foo/bar' from 'node_modules' folder, target file type 'JavaScript'.
Directory 'src/node_modules' does not exist, skipping all lookups in it.
File 'node_modules/@foo/package.json' does not exist.
File 'node_modules/@foo/bar.js' does not exist.
File 'node_modules/@foo/bar.jsx' does not exist.
Found 'package.json' at 'node_modules/@foo/bar/package.json'.
Actual behavior:
Scoped package detected, looking in 'foo__bar'
Loading module '@foo/bar' from 'node_modules' folder, target file type 'JavaScript'.
Directory 'src/node_modules' does not exist, skipping all lookups in it.
File 'node_modules/@foo/package.json' does not exist.
File 'node_modules/@foo/bar.js' does not exist.
File 'node_modules/@foo/bar.jsx' does not exist.
File 'node_modules/@foo/bar/index.js' does not exist.
File 'node_modules/@foo/bar/index.jsx' does not exist.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue