Closed ruionwriting closed 7 years ago
same issue (node 4.6.1 , npm 2.15.9)
Mozaïk requires npm@3, let me know if it solve the problem
yes it did, thanks! I could proceed in the installation. Only now when I try to run the app I get
mozaik-demo ♥ node app.js
info: registered API 'mozaik' (mode: poll)
info: registered API 'github' (mode: poll)
info: registered API 'travis' (mode: poll)
error: weather.apiToken: must be of type String
same issue here (node 4.6.1 , npm 3.10.9)
the same error even with: (node 6.9.2, npm 3.10.9)
@zufanka, @gmarab, the weather extension requires a token to be functionnal, see https://github.com/plouc/mozaik-ext-weather. When I first started the extension, it was not the case, it's quite annoying now, I'll probably remove it from the demo.
And the openweathermap doc: https://openweathermap.org/appid
if you don't want to create an account, you can remove the extension from the demo, you'll have to edit https://github.com/plouc/mozaik-demo/blob/master/src/App.jsx, https://github.com/plouc/mozaik-demo/blob/master/src/server.js and https://github.com/plouc/mozaik-demo/blob/master/config.js, just remove all references to mozaik-ext-weather
Sorry @plouc, I meant that I have the same problem as @ruionwriting, the one that opened the thread. I get the error during install npm
@gmarab, unfortunately, I don't have a window VM now, but only the post install failed, you should be able to build the assets by just running npm run build
, which is the postinstall action.
Thank you @plouc , using npm run build-assets now works.
+1 for removing ext-weather from the demo project. It causes the demo to fail out of the box, and there are enough other example widgets without it.
Hi there,
I faced the same problem as @zufanka being unable to run the app and receiving the following error: 'weather.apiToken: must be of type String' when trying to build the demo dashboard. Even replacing the 'xxxxx' from the WEATHER_API_TOKEN in the .env file by the API key (APPID) which is generated by openweathermap.org (you need to create an account + sign in to get the API-key) didnt help. The mozaik-demo was still not working @plouc .
So what I did and what solved it was simply setting the default value of the apiToken in the config.js file from null to the API key (APPID) that is generated by openweathermap. You can find the config.js file in the source-folder which is located in the following directory: mozaik-demo -> node_modules -> mozaik-ext-weather -> src -> config.js In that config.js you need to change the default value of the apiToken from null into the API key and after doing that everything worked as expected.
Hope that helps
mozaik-ext-weather
removed by https://github.com/plouc/mozaik-demo/commit/f070085bef61090d593291aaee90ff886c0e684f
you have to run the command: npm run build-assets
node --version
npm --version
Expected behavior
Run
npm install
with no errors to be able to build.Actual behavior
Fails with the following error:
Steps to reproduce
Run
npm install
.