example does not work
-
hi,
i need help to get startet with the plugin system.i read and used https://docs.windy-plugins.com/getting-started/
when i run
git clone https://github.com/windycom/windy-plugin-template.git cd windy-plugin-template npm install npm start
i get an error
> windy-plugin-template@2.0.2 start > rollup -w -c rollup v4.17.2 bundles src/plugin.svelte → dist/plugin.js, dist/plugin.min.js... ERROR failed to read input source map: failed to parse inline source map url pluginConfig.js.map Caused by: relative URL without a base at C:\Users\runneradmin/.cargo\registry\src\index.crates.io-6f17d22bba15001f\swc-0.275.1\src\lib.rs:405 Error while opening and parsing C:\Users\thoma\Desktop\kitesaas\windy-plugin-template\src\plugin.svelte/pluginConfig.ts Error: ENOENT: no such file or directory, open 'C:\Users\thoma\Desktop\kitesaas\windy-plugin-template\src\plugin.svelte/pluginConfig.ts' at Object.openSync (node:fs:601:3) at Object.readFileSync (node:fs:469:35) at transformCode (file:///C:/Users/thoma/Desktop/kitesaas/windy-plugin-template/node_modules/@windycom/plugin-devtools/index.mjs:181:31) at Object.renderChunk (file:///C:/Users/thoma/Desktop/kitesaas/windy-plugin-template/node_modules/@windycom/plugin-devtools/index.mjs:237:20) at C:\Users\thoma\Desktop\kitesaas\windy-plugin-template\node_modules\rollup\dist\shared\rollup.js:989:40 at processTicksAndRejections (node:internal/process/task_queues:95:5) { errno: -4058, syscall: 'open', code: 'ENOENT', path: 'C:\\Users\\thoma\\Desktop\\kitesaas\\windy-plugin-template\\src\\plugin.svelte/pluginConfig.ts' }
Did i miss something?
thanks
-
The plugins template does not work in the windows environment. It works in WSL2.
But you can try the following:
In:
node_modules\@windycom\plugin-devtools\index.mjs
Change:
const pathOfTheFile = facadeModuleId.replace(/\/[^/]*$/, '');
to:
const pathOfTheFile = facadeModuleId.replace(/\\[^\\]*$/, '');
-
Also. To run the examples.
add cross-env dependency from npm:
npm install cross-env
In package.json change to
"example01": "cross-env CONFIG=example01 rollup -w -c",
Windyty, S.E. - all rights reserved. Powered by excellent NodeBB
NodeBB & contributors, OSM & contributors, HERE maps