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

Unrecognized token in source text - setup script #82

Open
wolasss opened this issue May 4, 2023 · 0 comments
Open

Unrecognized token in source text - setup script #82

wolasss opened this issue May 4, 2023 · 0 comments

Comments

@wolasss
Copy link

wolasss commented May 4, 2023

Description

There seems to be an error thrown by the console while running a setup script on Windows 7 Embedded.

Unrecognized token in source text.
At line:1 char:37
+ node src/tools/dependencies/echo.js  <<<< @jess
    + CategoryInfo          : ParserError: (:) []
    + FullyQualifiedErrorId : UnrecognizedToken

Solution

Apparently this line is causing an error:

$pm2_logrotate_package = "$(node src/tools/dependencies/echo.js @jessety/pm2-logrotate)"

which can be fixed by surrounding a package name with ':

$pm2_logrotate_package = "$(node src/tools/dependencies/echo.js '@jessety/pm2-logrotate')"

After this fix it works, however I didn't check on other environments so it's best to verify on different windows versions if adding quotes changes anything :) Please mind that the quotes need to be added in multiple files (ex. setup-packages, setup-logrotate)

Steps to Reproduce

  1. npm run serup

Environment

Running on: 5/4/2023, pm2-installer 3.4.3 with node v12.22.12 and npm 6.14.16 on win32-6.1.7601.

PS C:\Windows\system32> $PSVersionTab

Name                           Value
----                           -----
CLRVersion                     2.0.50
BuildVersion                   6.1.76
PSVersion                      2.0
WSManStackVersion              2.0
PSCompatibleVersions           {1.0,
SerializationVersion           1.1.0.
PSRemotingProtocolVersion      2.1
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

1 participant