20lives / FrontendMastersDownloader

FrontendMasters Downloader - A tool to keep offline copy of frontendmasters courses
200 stars 41 forks source link

Npx cannot run the project #9

Closed YunEr-Wang closed 4 years ago

YunEr-Wang commented 4 years ago

The terminal log is as follows:

npx frontendmasters-downloader

npx: installed 38 in 5.606s
Must use import to load ES Module: /Users/xiangchen2011/.npm/_npx/11679/lib/node_modules/frontendmasters-downloader/index.js
YunEr-Wang commented 4 years ago

BTW, running the cloned one:

npm ERR! missing script: start
20lives commented 4 years ago

what version of npm are you using?

YunEr-Wang commented 4 years ago

6.14.4

Twentylives notifications@github.com 于2020年7月23日周四 下午6:04写道:

what version of npm are you using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/20lives/FrontendMastersDownloader/issues/9#issuecomment-662922909, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJZO5S4CSRUILPQUFJT57DR5ADLTANCNFSM4PFR2GMA .

20lives commented 4 years ago

and node version?

20lives commented 4 years ago

BTW, running the cloned one:

npm ERR! missing script: start

I updated the missing command.

YunEr-Wang commented 4 years ago

v12.16.3

YunEr-Wang commented 4 years ago
❯ npm run start

> frontendmasters-downloader@0.1.1 start /Users/xiangchen2011/Desktop/code/frontendmastersDownloader
> node index.js

internal/modules/cjs/loader.js:1149
      throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
      ^

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/xiangchen2011/Desktop/code/frontendmastersDownloader/index.js
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1149:13)
    at Module.load (internal/modules/cjs/loader.js:977:32)
    at Function.Module._load (internal/modules/cjs/loader.js:877:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
    at internal/main/run_main_module.js:18:47 {
  code: 'ERR_REQUIRE_ESM'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! frontendmasters-downloader@0.1.1 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the frontendmasters-downloader@0.1.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
20lives commented 4 years ago

you are using a node version that is not supported, you should be using v13.2 or newer,