Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm start 出错 #5

Open
victpa opened this issue Apr 30, 2022 · 2 comments
Open

npm start 出错 #5

victpa opened this issue Apr 30, 2022 · 2 comments

Comments

@victpa
Copy link

victpa commented Apr 30, 2022

root@localhost:~/TikTokWeb# npm start

[email protected] start /root/TikTokWeb
nodemon ./bin/www

/root/TikTokWeb/node_modules/update-notifier/index.js:58
} catch {
^

SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:617:28)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (/root/TikTokWeb/node_modules/nodemon/bin/nodemon.js:15:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: nodemon ./bin/www
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start 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-04-30T14_09_21_009Z-debug.lo
2022-04-30T13_59_12_853Z-debug.log
g

@Johnserf-Seed
Copy link
Owner

Johnserf-Seed commented May 14, 2022

1、删除node_modules、package-lock.json
2、更改为国内npm源
3、重新npm i
4、 npm start

Johnserf-Seed added a commit that referenced this issue Apr 9, 2023
Johnserf-Seed added a commit that referenced this issue Sep 3, 2023
1、让路由文件更加简洁
2、错误处理中间件
Johnserf-Seed added a commit that referenced this issue Sep 3, 2023
@Johnserf-Seed
Copy link
Owner

使用新镜像即可

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants