InCuca / vue-standalone-component

Vuejs template to build components with livecoding, tests, documentation and demos
MIT License
70 stars 6 forks source link

Cannot build on Windows #8

Closed tsauvajon closed 6 years ago

tsauvajon commented 6 years ago

I've just created a project with vue-cli, installed the dependencies and ran the build npm script.

It won't build on Windows 10, with the following log:

poi build --format cjs --dist dist; poi build --format umd --dist dist/umd
> Running in production mode
> Using external Poi config file
> location: "C:\DEV\web\socomodule\poi.config.js"
> Bundling with Webpack 3.12.0
> Creating an optimized production build:

> Using external babel configuration
> location: "C:\DEV\web\socomodule\.babelrc"

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string
    at assertPath (path.js:39:11)
    at Object.resolve (path.js:168:7)
    at module.exports (C:\DEV\web\socomodule\node_modules\poi\lib\create-config.js:106:16)
    at Poi.createWebpackConfig (C:\DEV\web\socomodule\node_modules\poi\lib\index.js:76:26)
    at Promise (C:\DEV\web\socomodule\node_modules\poi\lib\index.js:187:34)
    at new Promise (<anonymous>)
    at Poi.runMiddlewares (C:\DEV\web\socomodule\node_modules\poi\lib\index.js:186:12)
    at prepare.then (C:\DEV\web\socomodule\node_modules\poi\lib\index.js:89:24)
    at <anonymous>

The repo builds just fine on CircleCI though.

srini85 commented 6 years ago

@klarkc yeah. No expert with node and npm, but changed the scripts as follows to get past the issue

  "scripts": {
    "lint": "eslint src/**/*.vue",
    "build": "npm run build:cjs && npm run build:umd",
    "build:cjs": "poi build --format cjs --dist dist",
    "build:umd": "poi build --format umd --dist dist/umd",
    "build:doc": "vue-styleguidist build",
    "serve": "vue-styleguidist server",
    "test": "poi test",
    "test:watch": "poi test --watch",
    "test:cov": "poi test --coverage"
  },
klarkc commented 6 years ago

@srini85 thanks, added

Please reopen issue if the error is still happening