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

Typescript baseUrl and paths inside tsconfig.json error #542

Closed
wenpengfei opened this issue Jan 11, 2018 · 1 comment
Closed

Typescript baseUrl and paths inside tsconfig.json error #542

wenpengfei opened this issue Jan 11, 2018 · 1 comment

Comments

@wenpengfei
Copy link

This is a 🐛 bug report

🎛 Configuration (.babelrc, package.json, cli command)

{
  "presets": [
    "env",
    "react"
  ],
  "plugins": [
    [
      "import", {
        "libraryName": "antd",
        "libraryDirectory": "es",
        "style": true
      }
    ]
  ]
}
{
  "name": "parcel-react-mobx",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "start": "parcel index.html",
    "build": "parcel build index.html",
    "lint": "npm run lint:js && npm run lint:css",
    "lint:js": "tslint --project tslint.json 'src/**/*.ts*'",
    "lint:css": "stylelint src/**/*.scss"
  },
  "license": "MIT",
  "dependencies": {
    "antd": "^3.0.3",
    "axios": "^0.17.1",
    "js-cookie": "^2.2.0",
    "mobx": "^3.4.1",
    "mobx-react": "^4.3.5",
    "ramda": "^0.25.0",
    "react": "^16.2.0",
    "react-dom": "^16.2.0",
    "react-router": "^4.2.0",
    "react-router-dom": "^4.2.2",
    "styled-components": "^2.4.0"
  },
  "devDependencies": {
    "@types/node": "^8.5.2",
    "@types/react": "^16.0.31",
    "@types/react-dom": "^16.0.3",
    "autoprefixer": "^7.2.3",
    "babel-plugin-import": "^1.6.3",
    "babel-plugin-module-resolver": "^3.0.0",
    "babel-preset-env": "^1.6.1",
    "babel-preset-react": "^6.24.1",
    "babel-preset-stage-0": "^6.24.1",
    "less": "^2.7.3",
    "node-sass": "^4.7.2",
    "parcel-bundler": "^1.4.1",
    "parcel-plugin-typescript": "^0.2.5",
    "postcss-modules": "^1.1.0",
    "pre-commit": "^1.2.2",
    "stylelint": "^8.4.0",
    "stylelint-config-standard": "^18.0.0",
    "stylelint-scss": "^2.2.0",
    "tslint": "^5.8.0",
    "tslint-config-standard": "^7.0.0",
    "tslint-eslint-rules": "^4.1.1",
    "tslint-react": "^3.2.0",
    "typescript": "^2.6.2"
  },
  "pre-commit": [
    "lint"
  ]
}
{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "moduleResolution": "node",
    "declaration": false,
    "noImplicitAny": false,
    "removeComments": true,
    "experimentalDecorators": true,
    "noLib": false,
    "jsx": "react",
    "outDir": "dist",
    "noUnusedLocals": true,
    "types": [
      "node"
    ],
    "typeRoots": [
    "node_modules/@types"
    ],
    "lib": [      
      "dom",
      "es2015",
      "esnext.asynciterable"
    ],
    "baseUrl": "./src",
    "paths": {
      "utils": ["utils"],
      "views": ["views"],
      "components": ["components"],
      "service": ["service"],
      "stores": ["stores"]
    }
  },
  "exclude": [
    "node_modules",
    "static"
  ]
}

🤔 Expected Behavior

npm run build successfully

😯 Current Behavior

It just errors cannot resolve dependency 'views' (but npm start is ok)

💁 Possible Solution

I don`t know....💁💁💁

🌍 Your Environment

Software Version(s)
Parcel ^1.4.1
parcel-plugin-typescript ^0.2.5
Node 8.9.1
npm/Yarn 5.5.1
Operating System windows
@fathyb
Copy link
Contributor

fathyb commented Jan 11, 2018

Duplicate of #202

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

No branches or pull requests

3 participants