alexa / ask-cli

Alexa Skills Kit Command Line Interface
https://developer.amazon.com/en-US/docs/alexa/smapi/ask-cli-intro.html
Apache License 2.0
166 stars 54 forks source link

issue with install ASK CLI #111

Closed siddharthaweb closed 4 years ago

siddharthaweb commented 4 years ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[x ] Other... Please describe:

ERROR

try to install ask cli in linux server with the command :- sudo npm install -g ask-cli and receive a reply with this error

npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
/usr/local/n/versions/node/10.16.2/bin/ask -> /usr/local/n/versions/node/10.16.2/lib/node_modules/ask-cli/bin/ask.js

> jsonpath@1.0.2 postinstall /usr/local/n/versions/node/10.16.2/lib/node_modules/ask-cli/node_modules/jsonpath
> node lib/aesprim.js > generated/aesprim-browser.js

sh: generated/aesprim-browser.js: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! jsonpath@1.0.2 postinstall: `node lib/aesprim.js > generated/aesprim-browser.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the jsonpath@1.0.2 postinstall 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/2020-04-09T11_04_55_193Z-debug.log

Your Environment and Context

kakhaUrigashvili commented 4 years ago

@siddharthaweb try running:

npm install ask-cli -g --unsafe

it seems like it is an issue in one of our dependency's dependency. ask-smapi-sdk -> jsonpath https://github.com/dchester/jsonpath/issues/122

tk3369 commented 4 years ago

@kakhaUrigashvili Nice workaround! BTW, the character before unsafe needs to be replaced with a real dash -.

Are you aware of any adverse side effect?

kakhaUrigashvili commented 4 years ago

@kakhaUrigashvili Nice workaround! BTW, the character before unsafe needs to be replaced with a real dash -.

Are you aware of any adverse effect?

there are some good discussions online about --unsafe / --unsafe-perm.

I dont think there is another option until either jsonpath fixes the issue or we remove jsonpath from the dependencies.

siddharthaweb commented 4 years ago
run 
- sudo npm install ask-cli -g --unsafe

output - npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
/usr/bin/ask -> /usr/lib/node_modules/ask-cli/bin/ask.js
+ ask-cli@2.0.1
updated 1 package in 14.675s

then run

here we get the final output where we stuck till now

❯ Deploying Alexa Skill ✖ Updating Alexa Skill project for ASK profile default → Unexpected token C in JSON at position 0 Deploying Interaction Model, waiting for build › Error: There was a problem: › SyntaxError: Unexpected token C in JSON at position 0

talkingnews commented 4 years ago

Why is this closed? Clearly it's going to be an issue for everyone until fixed?

kakhaUrigashvili commented 4 years ago

@talkingnews I closed it because the original issue opened was related to "npm install -g" command and not to "ask configure --no-browser" . There is no other solution except of "npm install ask-cli -g --unsafe" at this point for the original issue.

@siddharthaweb I am assuming the project was originally created with v1. Please review this doc with instructions how to upgrade to v2 https://github.com/alexa/ask-cli/blob/develop/docs/Upgrade-Project-From-V1.md

After the upgrade you should be able to run:

ask deploy

siddharthaweb commented 4 years ago

@kakhaUrigashvili - thank you for the suggestion. we are using updated jovo with ASK-CLI version 1.7.1 and deploy successfully