cannot run the website locally
related to
- #982
when i was working on #982, i tried to npm run dev and have a look at the website but i got the following error :confused:
npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
npm WARN config location in the cache, and they are managed by
npm WARN config [`cacache`](http://npm.im/cacache).
> [email protected] dev
> vuepress dev
(node:13792) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
/home/amtoine/documents/repos/github.com/amtoine/nushell.github.io/node_modules/.bin/vuepress:3
import 'vuepress-vite/bin'
^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1175:20)
at Module._compile (node:internal/modules/cjs/loader:1219:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1309:10)
at Module.load (node:internal/modules/cjs/loader:1113:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at node:internal/main/run_main_module:23:47
Node.js v20.3.0
i tried running npm install again but still the error...
any idea what is happening?
Try to use node 16 lts instead, remove all node modules and reinstall. BTW: you can use fnm to manage node verisions and switch between them.
Try to use node 16 lts instead,
so downgrading 4 major releases?
it used to work not so long ago :thinking:
remove all node modules and reinstall. BTW: you can use fnm to manage node verisions and switch between them.
maybe we should add instructions to the CONTRIBUTING.md file? :yum:
so downgrading 4 major releases?
It's not 4 major releases but two, only even major numbers are stable releases for node. You can try 18 maybe it will work too
so downgrading 4 major releases?
It's not 4 major releases but two, only even major numbers are stable releases for node. You can try 18 maybe it will work too
i'm very much not familiar with node, npm and the rest...
and my downgrade tool on Arch does not want to downgrade node :cry:
@amtoine You can use https://github.com/Schniz/fnm to switch between node versions
This appears to be working on Node 20.14. Can it be closed?
Thanks