Coder Social home page Coder Social logo

Module parse failed about mfe-starter HOT 8 CLOSED

patrickjs avatar patrickjs commented on May 1, 2024
Module parse failed

from mfe-starter.

Comments (8)

PatrickJS avatar PatrickJS commented on May 1, 2024

can you delete your node_modules/ and run npm install I changed the version of typescript

from mfe-starter.

PatrickJS avatar PatrickJS commented on May 1, 2024

and also ensure this file is correct https://github.com/angular-class/angular2-webpack-starter/blob/master/webpack.config.js#L98

from mfe-starter.

andersbc avatar andersbc commented on May 1, 2024

It didn't fix it :-(

I did as you suggested (also ran npm cache clean before npm install). webpack.config.js is identical to the current one.

Here are some snippets of what npm packages are installed in the two versions of the repo I have installed (I used npm list):

In my working version of the repo (I think its 2 commits before the current one) I have:

...
+-- [email protected] (git://github.com/microsoft/TypeScript.git#a24aa6f57d281bafd3535f0f4c3f492364a8b4d6)
+-- [email protected]
|     +-- [email protected]
|     |     +-- [email protected] 
|     |     +-- [email protected]
|     +-- [email protected]  
...

In the current version - the one giving me the error, I have:

...
+-- [email protected] (git://github.com/microsoft/TypeScript.git#a24aa6f57d281bafd3535f0f4c3f492364a8b4d6)
+-- [email protected]
|     +-- [email protected]
|     +-- [email protected]
|     |     +-- [email protected] 
|     |     +-- [email protected]
|     +--  [email protected] 
...

from mfe-starter.

PatrickJS avatar PatrickJS commented on May 1, 2024

cc @blakeembrey

from mfe-starter.

andersbc avatar andersbc commented on May 1, 2024

sorry.. push the wrong button -- reopening the issue

from mfe-starter.

blakeembrey avatar blakeembrey commented on May 1, 2024

@andersbc What happens when you use an older loader version like npm i [email protected]? The only possible commit that (I think) can be causing issues is blakeembrey/typescript-simple-loader@db5a44e

from mfe-starter.

andersbc avatar andersbc commented on May 1, 2024

@blakeembrey. thanks, it wasn't that though (it didn't change anything). I think the problem comes from some npm-related fault on my part when I installed the repo. I did a completely fresh install (git clone) and the problem disappeared. A diff between the working and failing installation pointed to some differences in node locations, so I'm going to close the issue, since it is not related to this repo.

For the record:
The diff between my failing install and my new fresh install came up with a difference in a config.gypi file. In the working case the 'prefix' variable had the value of ''/usr/local". In the failing case it was "/home/anders/.nvm/versions/node/v0.12.7" (there were other differences in this file as well). If I recall right I followed the instructions in this article between the failing and working installation. The article shows a command that makes the currently active node version (I'm using node version manager) global to all users - my hunch is that is that that command fixed my problem.

from mfe-starter.

blakeembrey avatar blakeembrey commented on May 1, 2024

@andersbc Glad you sorted it! I use n personally but it's the same idea. If you're working with any projects that have binaries you'll need to reinstall them when you switch versions. I usually just rm -rf node_modules && npm i.

from mfe-starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.