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

Windows - npm start error (webpack: Failed to compile) #6938

Open
AirMike opened this Issue Oct 12, 2018 · 6 comments

Comments

Projects
None yet
3 participants
@AirMike
Copy link
Contributor

AirMike commented Oct 12, 2018

Hi,

could you please help with error I get when trying to run tine20 in development mode (start webpack-dev-server)

I'm running on Windows 8.1

When I try to run npm start I get error:

$ npm start

> tine20_tinebase@ start C:\xampp\htdocs\tine20m\tine20\Tinebase\js
> ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --config webpack.dev.js

'.' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! tine20_tinebase@ start: `./node_modules/webpack-dev-server/bin/webpack-dev-server.js --config webpack.dev.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the tine20_tinebase@ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

but for this I can get around by manually running command:

./node_modules/webpack-dev-server/bin/webpack-dev-server.js --config webpack.dev.js

Then I get error that webpack cannot compile:

$ ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --config webpack.dev.js
[HPM] Proxy created: [ '**', '!/webpack-dev-server*/**' ]  ->  http://localhost/
Project is running at http://0.0.0.0:10443/webpack-dev-server/
webpack output is served from /
Hash: 501797cce7b4044a5ec5
Version: webpack 3.10.0
Time: 22785ms
                                                              Asset     Size  Chunks                    Chunk Names
                   Tinebase/js/Tinebase-a0f070031ea646cc9f00-FAT.js  5.57 MB       0  [emitted]  [big]  Tinebase/js/Tinebase
                   Tinebase/js/hammerjs-82b8bcbf43985e7960d6-FAT.js  76.9 kB       1  [emitted]         Tinebase/js/hammerjs
                Tinebase/js/html2canvas-4fba719052557fec13ae-FAT.js   133 kB       2  [emitted]         Tinebase/js/html2canvas
                    Tinebase/js/linkify-76e6c528cc295e83518c-FAT.js  81.6 kB       3  [emitted]         Tinebase/js/linkify
                 Tinebase/js/OpenLayers-07a6ab25b5f4df3254cc-FAT.js   805 kB       4  [emitted]  [big]  Tinebase/js/OpenLayers
                  Setup/js/fatClient.js-501797cce7b4044a5ec5-FAT.js   247 kB       5  [emitted]         Setup/js/fatClient.js
Calendar/js/pollClient/src/index.es6.js-501797cce7b4044a5ec5-FAT.js  1.46 MB       6  [emitted]  [big]  Calendar/js/pollClient/src/index.es6.js
   Tinebase/js/postal-xwindow-client.js-501797cce7b4044a5ec5-FAT.js   952 kB       7  [emitted]  [big]  Tinebase/js/postal-xwindow-client.js
               Tinebase/js/fatClient.js-501797cce7b4044a5ec5-FAT.js  7.21 kB       8  [emitted]         Tinebase/js/fatClient.js
  [10] ./node_modules/@babel/runtime/helpers/interopRequireDefault.js 145 bytes {0} {5} {6} [built]
  [11] ./node_modules/lodash/lodash.js 540 kB {0} {6} {7} [built]
  [61] ./Locale.js 3.31 kB {0} {5} {6} [built]
  [62] ./Locale/Gettext.js 4.79 kB {0} {5} {6} [built]
  [86] ./tineInit.js 40.2 kB {0} {5} [built]
  [87] ./Tinebase.js 826 bytes {0} [built]
 [166] ./node_modules/postal.xwindow/lib/postal.xwindow.js 26.8 kB {0} {7} [built]
 [167] ./node_modules/postal.request-response/lib/postal.request-response.js 5.16 kB {0} {7} [built]
 [168] C:/xampp/htdocs/tine20m/tine20/Calendar/js/pollClient/src/index.es6.js 2.01 kB {6} [built] [1 error]
 [169] ./node_modules/vue/dist/vue.runtime.esm.js 208 kB {6} [built]
 [172] C:/xampp/htdocs/tine20m/tine20/Calendar/js/pollClient/src/plugin/tine20-rpc.js 1.78 kB {6} [built]
 [191] C:/xampp/htdocs/tine20m/tine20/Calendar/js/pollClient/src/App.vue 2.4 kB {6} [built] [1 error]
 [243] C:/xampp/htdocs/tine20m/tine20/Setup/js/fatClient.js 471 bytes {5} [built]
 [245] ./fatClient.js 458 bytes {8} [built]
 [246] ./postal-xwindow-client.js 343 bytes {7} [built]
    + 1647 hidden modules

ERROR in C:/xampp/htdocs/tine20m/tine20/Calendar/js/pollClient/src/App.vue

  ✘  https://google.com/#q=notice%2Fnotice  Could not find a match for the mustMatch pattern
  ..\..\Calendar\js\pollClient\src\App.vue:170:1
  import axios from 'axios'
   ^


✘ 1 problem (1 error, 0 warnings)


Errors:
  1  https://google.com/#q=notice%2Fnotice
 @ C:/xampp/htdocs/tine20m/tine20/Calendar/js/pollClient/src/index.es6.js 11:34-54

ERROR in C:/xampp/htdocs/tine20m/tine20/Calendar/js/pollClient/src/index.es6.js

  ✘  https://google.com/#q=notice%2Fnotice  Could not find a match for the mustMatch pattern
  ..\..\Calendar\js\pollClient\src\index.es6.js:9:1
  import _ from 'lodash'
   ^


✘ 1 problem (1 error, 0 warnings)


Errors:
  1  https://google.com/#q=notice%2Fnotice

ERROR in ./AreaLocks.es6.js

  ✘  https://google.com/#q=notice%2Fnotice  Could not find a match for the mustMatch pattern
  AreaLocks.es6.js:10:1
  import UserPasswordProvider from 'AreaLocks/UserPasswordProvider'
   ^


✘ 1 problem (1 error, 0 warnings)


Errors:
  1  https://google.com/#q=notice%2Fnotice
 @ ./tineInit.js 720:24-50
 @ ./fatClient.js

ERROR in ./AreaLocks/AbstractProvider.es6.js

  ✘  https://google.com/#q=notice%2Fnotice  Could not find a match for the mustMatch pattern
  AreaLocks\AbstractProvider.es6.js:10:1
  class AbstractProvider extends Ext.util.Observable {
   ^


✘ 1 problem (1 error, 0 warnings)


Errors:
  1  https://google.com/#q=notice%2Fnotice
 @ ./AreaLocks/UserPasswordProvider.es6.js 24:48-81
 @ ./AreaLocks.es6.js
 @ ./tineInit.js
 @ ./fatClient.js

ERROR in ./AreaLocks/PinProvider.es6.js

  ✘  https://google.com/#q=notice%2Fnotice  Could not find a match for the mustMatch pattern
  AreaLocks\PinProvider.es6.js:9:1
  import UserPasswordProvider from './UserPasswordProvider.es6'
   ^


✘ 1 problem (1 error, 0 warnings)


Errors:
  1  https://google.com/#q=notice%2Fnotice
 @ ./AreaLocks.es6.js 18:42-74
 @ ./tineInit.js
 @ ./fatClient.js

ERROR in ./AreaLocks/TokenProvider.es6.js

  ✘  https://google.com/#q=notice%2Fnotice  Could not find a match for the mustMatch pattern
  AreaLocks\TokenProvider.es6.js:9:1
  import UserPasswordProvider from './UserPasswordProvider.es6'
   ^


✘ 1 problem (1 error, 0 warnings)


Errors:
  1  https://google.com/#q=notice%2Fnotice
 @ ./AreaLocks.es6.js 20:44-78
 @ ./tineInit.js
 @ ./fatClient.js

ERROR in ./AreaLocks/UserPasswordProvider.es6.js

  ✘  https://google.com/#q=notice%2Fnotice  Could not find a match for the mustMatch pattern
  AreaLocks\UserPasswordProvider.es6.js:9:1
  import AbstractProvider from './AbstractProvider.es6'
   ^


✘ 1 problem (1 error, 0 warnings)


Errors:
  1  https://google.com/#q=notice%2Fnotice
 @ ./AreaLocks.es6.js 16:51-92
 @ ./tineInit.js
 @ ./fatClient.js

ERROR in ./util/waitFor.es6.js

  ✘  https://google.com/#q=notice%2Fnotice  Could not find a match for the mustMatch pattern
  util\waitFor.es6.js:9:1
  export default function (condition, timeout, interval) {
   ^


✘ 1 problem (1 error, 0 warnings)


Errors:
  1  https://google.com/#q=notice%2Fnotice
 @ ./tineInit.js 15:0-39
 @ ./fatClient.js

ERROR in ./app-loader.js!./app-loader.js
Module parse failed: Bad character escape sequence (31:13)
You may need an appropriate loader to handle this file type.
|       return p.then(function() {return import(
|         /* webpackChunkName: "ActiveSync/js/ActiveSync" */
|         "C:\xampp\htdocs\tine20m\tine20/ActiveSync/ActiveSync.jsb2"
|       )});
|     }
 @ ./tineInit.js 725:24-61
 @ ./fatClient.js
webpack: Failed to compile.

@AirMike AirMike changed the title npm start error - Windows Windows - npm start error (webpack: Failed to compile) Oct 12, 2018

@pschuele

This comment has been minimized.

Copy link
Member

pschuele commented Oct 26, 2018

which npm / nodejs versions are you using? looks like a version problem to me.

@AirMike

This comment has been minimized.

Copy link
Contributor Author

AirMike commented Oct 26, 2018

/c/xampp/htdocs
$ node -v
v8.12.0

/c/xampp/htdocs
$ npm -v
5.8.0

@pschuele

This comment has been minimized.

Copy link
Member

pschuele commented Oct 29, 2018

ah, ok. those versions look ok to me.

maybe there is an issue with the webpack configuration. it might need to be adopted for windows:
https://github.com/tine20/tine20/blob/master/tine20/Tinebase/js/webpack.common.js
https://github.com/tine20/tine20/blob/master/tine20/Tinebase/js/webpack.dev.js

could there be a problem with slashes/backslashes in paths?

at least the "npm start" command looks like it needs to be adopted on windows:

'.' is not recognized as an internal or external command,

what happens if you start the webpack-dev-server directly from the command line?

node_modules/webpack-dev-server/bin/webpack-dev-server.js --config webpack.dev.js
@AirMike

This comment has been minimized.

Copy link
Contributor Author

AirMike commented Oct 29, 2018

npm start is not a problem and I can run webpack dev server directly from command line but then those errors I'm mentioning happened.

I'm using webpack with some other project and don't have problems with slashes/backslashes in paths but here there are some other stuff that are happening in build that are causing this error and I'm not sure from where they are are commint (from what I can see in error description they are comming from import statement, e.g. import axios from 'axios')

@pschuele

This comment has been minimized.

Copy link
Member

pschuele commented Oct 30, 2018

hm, google does not have anything for this error - strange!

maybe @corneliusweiss has an idea?

@AirMike

This comment has been minimized.

Copy link
Contributor Author

AirMike commented Oct 30, 2018

I tried runing npm start on CentOS 6 and webpack is compiling without errors so it is for sure related to Windows environment.

I also tried to google it but without luck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.