html2md
html2md copied to clipboard
witch version of node pls
npm i with 15 works but show this error:
https://gist.github.com/fd5ea31429433acd8350ab7c9f644f9f
how solved?
@johnfelipe Regarding this issue, I suggest you to use node 12 (12.18.0 to be exact). I will take the time to look at the compatibility issues of higher versions of node
root@felipe:~/html2md# n 12.18.0
installing : node-v12.18.0
mkdir : /usr/local/n/versions/node/12.18.0
fetch : https://nodejs.org/dist/v12.18.0/node-v12.18.0-linux-x64.tar.xz
copying : node/12.18.0
installed : v12.18.0 (with npm 6.14.4)
root@felipe:~/html2md# npm install
> [email protected] install /root/html2md/node_modules/husky
> node husky install
internal/modules/cjs/loader.js:969
throw err;
^
Error: Cannot find module '/root/html2md/node_modules/husky/husky'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
at Function.Module._load (internal/modules/cjs/loader.js:842:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm WARN [email protected] requires a peer of eslint@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of eslint@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/@vuepress/core/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/watchpack-chokidar2/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/webpack-dev-server/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node husky install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-08-09T01_01_46_643Z-debug.log
root@felipe:~/html2md# npm run dev
> [email protected] dev /root/html2md
> cross-env ENV=dev node server --watch server
ℹ Preparing project for development 01:02:10
ℹ Initial build may take a while 01:02:10
✔ Builder initialized 01:02:10
✔ Nuxt files generated 01:02:10
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
● Client █████████████████████████ building (30%) 174/179 modules 5 active
node_modules/core-js/modules/_set-proto.js
✖ Server
Compiled with some errors in 5.49s
✖ Client
Compiled with some errors in 7.01s
✖ Server
Compiled with some errors in 5.49s
ERROR Failed to compile with 3 errors friendly-errors 01:02:18
ERROR in ./assets/css/element-variables.scss friendly-errors 01:02:18
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Error: ENOENT: no such file or directory, scandir '/root/html2md/node_modules/node-sass/vendor'
at Object.readdirSync (fs.js:948:3)
at Object.getInstalledBinaries (/root/html2md/node_modules/node-sass/lib/extensions.js:133:13)
at foundBinariesList (/root/html2md/node_modules/node-sass/lib/errors.js:20:15)
at foundBinaries (/root/html2md/node_modules/node-sass/lib/errors.js:15:5)
at Object.module.exports.missingBinary (/root/html2md/node_modules/node-sass/lib/errors.js:45:5)
at module.exports (/root/html2md/node_modules/node-sass/lib/binding.js:15:30)
at Object.<anonymous> (/root/html2md/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at getDefaultSassImpl (/root/html2md/node_modules/sass-loader/dist/index.js:198:10)
at Object.loader (/root/html2md/node_modules/sass-loader/dist/index.js:80:29)
friendly-errors 01:02:18
ERROR in ./assets/css/element-variables.scss friendly-errors 01:02:18
Module build failed (from ./node_modules/extract-css-chunks-webpack-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Error: ENOENT: no such file or directory, scandir '/root/html2md/node_modules/node-sass/vendor'
at Object.readdirSync (fs.js:948:3)
at Object.getInstalledBinaries (/root/html2md/node_modules/node-sass/lib/extensions.js:133:13)
at foundBinariesList (/root/html2md/node_modules/node-sass/lib/errors.js:20:15)
at foundBinaries (/root/html2md/node_modules/node-sass/lib/errors.js:15:5)
at Object.module.exports.missingBinary (/root/html2md/node_modules/node-sass/lib/errors.js:45:5)
at module.exports (/root/html2md/node_modules/node-sass/lib/binding.js:15:30)
at Object.<anonymous> (/root/html2md/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at getDefaultSassImpl (/root/html2md/node_modules/sass-loader/dist/index.js:198:10)
at Object.loader (/root/html2md/node_modules/sass-loader/dist/index.js:80:29)
at /root/html2md/node_modules/webpack/lib/NormalModule.js:316:20
at /root/html2md/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /root/html2md/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at runSyncOrAsync (/root/html2md/node_modules/loader-runner/lib/LoaderRunner.js:143:3)
at iterateNormalLoaders (/root/html2md/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
at Array.<anonymous> (/root/html2md/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
at Storage.finished (/root/html2md/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
at /root/html2md/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
at /root/html2md/node_modules/graceful-fs/graceful-fs.js:123:16
at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3)
friendly-errors 01:02:18
@ ./plugins/element-ui.js 8:0-45
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi eventsource-polyfill webpack-hot-middleware/client?reload=true&timeout=30000&ansiColors=&overlayStyles=&path=%2F__webpack_hmr%2Fclient&name=client ./.nuxt/client.js
friendly-errors 01:02:18
ERROR in ./pages/index.vue?vue&type=style&index=0&lang=scss&
Module build failed (from ./node_modules/extract-css-chunks-webpack-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Error: ENOENT: no such file or directory, scandir '/root/html2md/node_modules/node-sass/vendor'
at Object.readdirSync (fs.js:948:3)
at Object.getInstalledBinaries (/root/html2md/node_modules/node-sass/lib/extensions.js:133:13)
at foundBinariesList (/root/html2md/node_modules/node-sass/lib/errors.js:20:15)
at foundBinaries (/root/html2md/node_modules/node-sass/lib/errors.js:15:5)
at Object.module.exports.missingBinary (/root/html2md/node_modules/node-sass/lib/errors.js:45:5)
at module.exports (/root/html2md/node_modules/node-sass/lib/binding.js:15:30)
at Object.<anonymous> (/root/html2md/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at getDefaultSassImpl (/root/html2md/node_modules/sass-loader/dist/index.js:198:10)
at Object.loader (/root/html2md/node_modules/sass-loader/dist/index.js:80:29)
at /root/html2md/node_modules/webpack/lib/NormalModule.js:316:20
at /root/html2md/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /root/html2md/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at runSyncOrAsync (/root/html2md/node_modules/loader-runner/lib/LoaderRunner.js:143:3)
at iterateNormalLoaders (/root/html2md/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
at iterateNormalLoaders (/root/html2md/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
at /root/html2md/node_modules/loader-runner/lib/LoaderRunner.js:236:3
at Object.context.callback (/root/html2md/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at selectBlock (/root/html2md/node_modules/vue-loader/lib/select.js:39:19)
at Object.module.exports (/root/html2md/node_modules/vue-loader/lib/index.js:79:12)
friendly-errors 01:02:18
@ ./pages/index.vue?vue&type=style&index=0&lang=scss& 1:0-441 1:0-441
@ ./pages/index.vue
@ ./.nuxt/router.js
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi eventsource-polyfill webpack-hot-middleware/client?reload=true&timeout=30000&ansiColors=&overlayStyles=&path=%2F__webpack_hmr%2Fclient&name=client ./.nuxt/client.js
friendly-errors 01:02:18
ℹ Waiting for file changes 01:02:18
READY Server listening on http://localhost:3031 01:02:18
how solve this?
@johnfelipe It is recommended to delete the node_modules directory first, and then re-npm install.

do u use windows, is compatible with ubuntu 20?
It stands to reason that the node environment is universal and has nothing to do with the operating system. We normally develop with Windows and macOS, so we didn't encounter your problem. a little difficult 😂
what i missing here? im using ubuntu20
in begin
root@ubuntu20portatil:~/nft-name-generator# cd
root@ubuntu20portatil:~# node -v
v18.7.0
root@ubuntu20portatil:~# npm install --location=global n
added 1 package, and audited 2 packages in 1s
found 0 vulnerabilities
npm notice
npm notice New minor version of npm available! 8.15.0 -> 8.16.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.16.0
npm notice Run npm install -g [email protected] to update!
npm notice
root@ubuntu20portatil:~# npm install --location=global [email protected]
changed 18 packages, and audited 205 packages in 3s
11 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
root@ubuntu20portatil:~# n 12.18.0
installing : node-v12.18.0
mkdir : /usr/local/n/versions/node/12.18.0
fetch : https://nodejs.org/dist/v12.18.0/node-v12.18.0-linux-x64.tar.xz
copying : node/12.18.0
installed : v12.18.0 (with npm 6.14.4)
Note: the node command changed location and the old location may be remembered in your current shell.
old : /usr/bin/node
new : /usr/local/bin/node
If "node --version" shows the old version then start a new shell, or reset the location hash with:
hash -r (for bash, zsh, ash, dash, and ksh)
rehash (for csh and tcsh)
next
felipe@ubuntu20dockers:~$ sudo su
root@ubuntu20dockers:/home/felipe# cd
root@ubuntu20dockers:~# node -v
v12.18.0
root@ubuntu20dockers:~# git clone https://github.com/helloworld-Co/html2md
Cloning into 'html2md'...
remote: Enumerating objects: 130, done.
remote: Counting objects: 100% (130/130), done.
remote: Compressing objects: 100% (80/80), done.
remote: Total 130 (delta 49), reused 104 (delta 32), pack-reused 0
Receiving objects: 100% (130/130), 719.92 KiB | 2.12 MiB/s, done.
Resolving deltas: 100% (49/49), done.
root@ubuntu20dockers:~# cd html2md
root@ubuntu20dockers:~/html2md# ls
assets layouts package-lock.json pm2system.config.js static
daitu.jpg nuxt.config.js pages README.md wx-group.png
demo.png package.json plugins server wx.png
root@ubuntu20dockers:~/html2md# npm install
> [email protected] install /root/html2md/node_modules/husky
> node husky install
internal/modules/cjs/loader.js:969
throw err;
^
Error: Cannot find module '/root/html2md/node_modules/husky/husky'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
at Function.Module._load (internal/modules/cjs/loader.js:842:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/webpack-dev-server/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/watchpack-chokidar2/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/@vuepress/core/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node husky install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-08-09T03_07_06_203Z-debug.log
may be change to not root user? may be change to ubuntu18?