令牌'&&'在此版本中不是有效的语句分隔符 [英] The token '&&' is not a valid statement separator in this version
本文介绍了令牌'&&'在此版本中不是有效的语句分隔符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的React Project上安装 Webpack 的过程中,以下问题阻碍了我的进步:
On the way of installing Webpack on my React Project, the following problem hinders my progress:
配置Webpack的最后一步
npm run build && node ./dist/main.js
Windows Power Shell/Visual Studio代码上的错误
PS C:\Users\pythonbuddha\Desktop\to_experiment\to-do-list> npm run build && node ./dist/main.js
At line:1 char:15
+ npm run build && node ./dist/main.js
+ ~~
The token '&&' is not a valid statement separator in this version.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : InvalidEndOfLine
承诺配置Webpack的教程
https://developerhandbook.com/webpack/webpack-4-from-absolute-scratch/
https://developerhandbook.com/webpack/how-to-configure-scss-modules-for-webpack/
推荐答案
It's because you're in PowerShell, try running it in CMD
or Git Bash
或者(如果您希望在PS中继续):
Alternatively (if you wish to continue in PS):
(npm run build) -and (node ./dist/main.js)
第三种选择,只需分开运行它们,
3rd Alternative, just run them separetly,
这篇关于令牌'&&'在此版本中不是有效的语句分隔符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文