-
Notifications
You must be signed in to change notification settings - Fork 2k
Error while installing [email protected] 'invalid or unexpected token' #4805
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
Comments
Experiencing the same thing with npm 3.10.10 on win 10 |
Seeing the same with npm 5.3.0 |
To be clear, if you are able to change your dep, you should use |
Same issue is there for Windows 10 and npm 5.5.1 |
Same issue here Windows 8.1 & npm 3.5.2. Karma is loading the coffeescript package. |
I don't want to hurry you, but is there any ETA? This is a critical issue for most of us :) |
Why did not you use "deprecated" field from package.json? |
As a quick workaround, you can reference an older version of the library in your package.json. |
My package.json looks funny now with typescript and coffeescript side by side 😄 But it works, thanks @garvik |
The problem is that many third-party libraries use this library. |
+1 @pmaza. I'm new to node, is there a way to enforce the use of a version for a package globally? |
@garvik 's solution worked for me, even though I have only third party dependencies on this library. |
I do not have npm access. Paging @GeoffreyBooth. |
@meowthing I've just solved it right now installing "[email protected]" as a dev dependency. |
Adding "coffee-script": "1.12.7" as devDependency solved it. Thanks all! |
I suppose that windows machine can't recognize the string argument wrapped in single quotes. |
Would be great to unpublish the package or publish a fix. I think this is breaking many builds on Windows (it's breaking ours at least and we don't have a direct dependency on this package) |
Or simplify this
https://github.com/jashkenas/coffeescript/blob/1/package.json#L31
By just doing a console.warn and avoid all fancy things
…On Thu, 30 Nov 2017 at 11:58, Guillaume Mouron ***@***.***> wrote:
Would be great to unpublish the package or publish a fix. I think this is
breaking many builds on Windows (it's breaking ours at least and we don't
have a direct dependency on this package)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#4805 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQv-WnXQOcA-iQ-oYCWNfDuVw7tDblPwks5s7opRgaJpZM4QwMGf>
.
|
Same issue is there for Windows 7 and npm 6.11.0 |
I am having the same issue where coffee-script is an internal dependency of some third party module due to which actual installation of our npm module is failing. I am using npm 5.4.2 on windows 7. Please release the fix as soon as possible. |
The same I installed 1.12.1 but vue-cli needs the newest and I can`t install it Windows 10 npm 5 node 8.9 |
There are always two ways out, go easy and go the right way. Simple - replace double quotes or replace the library (if possible). Is correct - to make fix as soon as possible |
@GeoffreyBooth can you please communicate about an ETA ? Or unpublish the package ? |
Yes this is just a mess, hard to fix in the dependency tree.. |
This is happening when you execute this command from the windows CMD, not from the mac or linux term, if you want to reproduce get a windows CMD and paste the node eval command that you execute on npm install
This will print the undesired |
Me too when trying to build in VSTS. It's a dependency on jasmine-node - I'm not using it directly. |
I'm experiencing this on a mac too, doesn't seem to be a windows CMD specific issue. This was for a new installation of a package we use that depends on coffee-script |
Has anyone contacted [email protected] ? He is in Stockholm and should be awake |
Same problem here when I tried to install i18n |
Using old version of keystone which uses packages that are using coffee-script 1.12.8. |
Well, now that we have your attention 😄 I changed |
@GeoffreyBooth thank you :-). |
@GeoffreyBooth thanks |
So I assume the emergency is over, now that While you’re here, does anyone know how we could print this error only on direct installs, i.e. when |
@GeoffreyBooth I think what you are looking for is something like; (not tested) var fs = require('fs'),
path = require('path');
function readJsonFile(filePath) {
try {
var data = fs.readFileSync(filePath, 'utf-8');
return JSON.parse(data);
} catch (error) {
return null;
}
}
var pgkCoffeeData = readJsonFile('./package.json');
if (!pgkCoffeeData || !pgkCoffeeData._where || pgkCoffeeData._where.indexOf('node_modules') !== -1) {
return;
}
var pgkData = readJsonFile(path.join(pgkCoffeeData._where, './package.json'));
if (!pgkData) {
return;
}
var hasOldCoffeScript = (pgkData.dependencies && pgkData.dependencies['coffee-script'])
|| (pgkData.devDependencies && pgkData.devDependencies['coffee-script']);
if (hasOldCoffeScript) {
// oops old script is
} Updated implementation for anyone looking into this from the future :) Actual implementation: https://github.com/jashkenas/coffeescript/pull/4807/files |
@GeoffreyBooth Why not just use |
@GeoffreyBooth just tested it, the emergency is over Though I have no clue how we have a dependency on coffee-script: it's not in our package.json and not in the dependency tree when printing it with "npm ls" |
@SwintDC thanks 😄 @alan-agius4 Let’s discuss in #4807. If there’s anyone with Windows or CI environments that can help us test, please check out that PR. I’ll aim to push a fix on Friday night, so that at least there’s the weekend for any flood of new problems. Sorry for the headache everyone. I have until tonight to |
@GabrielRatener IMHO it makes perfect sense to unpublish 1.12.8. It's faulty release, don't let anyone ever install it again for your own peace of mind. |
Okay, I’ve unpublished |
…is listed under `dependencies` or `devDependencies` Closes: jashkenas#4805
…is listed under `dependencies` or `devDependencies` Closes: jashkenas#4805
…is listed under `dependencies` or `devDependencies` Closes: jashkenas#4805
…is listed under `dependencies` or `devDependencies` Closes: jashkenas#4805
…is listed under `dependencies` or `devDependencies` Closes: jashkenas#4805
When I try to install like below I get the error.
I am using NPM 5.6.0 on a Windows 10 Machine .
The text was updated successfully, but these errors were encountered: